/* ========================================
   Subdomain Dark Theme
   Modern One-Page Design
   ======================================== */

/* CSS Variables */
:root {
    --bg-primary: #13131a;
    --bg-secondary: #181820;
    --bg-tertiary: #22222e;
    --bg-card: #1c1c26;
    --bg-card-hover: #252532;

    --text-primary: #f5f5f7;
    --text-secondary: #b4b4c4;
    --text-muted: #7a7a8c;

    --accent-primary: #7c7ff7;
    --accent-secondary: #9d8cfa;
    --accent-tertiary: #b896fc;
    --accent-gradient: linear-gradient(135deg, #7c7ff7 0%, #b896fc 100%);

    --border-color: rgba(255, 255, 255, 0.12);
    --border-light: rgba(255, 255, 255, 0.08);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(124, 127, 247, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
}

/* Gradient Background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 127, 247, 0.35) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(157, 140, 250, 0.3) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(184, 150, 252, 0.25) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 0 1rem 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-base);
}

.site-header.scrolled {
    padding: 0 0 0.75rem 0;
    background: rgba(10, 10, 15, 0.95);
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo:hover {
    opacity: 0.9;
}

.btn-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition-base);
    box-shadow: 0 2px 12px rgba(124, 127, 247, 0.3);
}

.btn-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(124, 127, 247, 0.4);
    color: #ffffff;
}

/* Hero Section */
.hero-section {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 0 4rem;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: var(--accent-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease;
}

.hero-badge i {
    font-size: 0.75rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--accent-primary);
}

.meta-divider {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

.hero-scroll {
    animation: fadeInUp 0.6s ease 0.3s both;
}

.scroll-indicator {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition-base);
}

.scroll-indicator i {
    font-size: 1.25rem;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator:hover {
    color: var(--accent-primary);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content Section */
.content-section {
    padding: 4rem 0;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.article-body {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.8;
}

.article-body h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-primary);
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
}

.article-body h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.5rem;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.625rem;
    padding-left: 0.5rem;
}

.article-body ul li::marker {
    color: var(--accent-primary);
}

.article-body ol li::marker {
    color: var(--accent-primary);
    font-weight: 600;
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-body a {
    color: var(--accent-primary);
    border-bottom: 1px solid transparent;
}

.article-body a:hover {
    border-bottom-color: var(--accent-primary);
}

.article-body blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-tertiary);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
}

.article-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.article-body th,
.article-body td {
    padding: 0.875rem 1rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.article-body th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
}

.article-body tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Tags Section */
.tags-section {
    padding: 2rem 0;
}

.tags-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
}

.tags-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tags-header i {
    color: var(--accent-primary);
}

.tags-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    transition: var(--transition-base);
}

.tag-item:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Related Section */
.related-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-header h2 i {
    margin-right: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.related-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.related-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-views {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.related-arrow {
    color: var(--text-muted);
    transition: var(--transition-base);
}

.related-card:hover .related-arrow {
    color: var(--accent-primary);
    transform: translateX(4px);
}

.no-related {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-related i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* CTA Section */
.cta-section {
    padding: 4rem 0 6rem;
}

.cta-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.cta-card p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-base);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
    color: #ffffff;
}

.cta-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.decoration-circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -100px;
}

.decoration-circle:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -50px;
}

.decoration-circle:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-copyright p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-base);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 991.98px) {
    .article-card {
        padding: 2rem;
    }

    .cta-card {
        padding: 3rem 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 10rem 3rem 0 3rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .meta-divider {
        display: none;
    }

    .article-card {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }

    .article-body h1 {
        font-size: 1.5rem;
    }

    .article-body h2 {
        font-size: 1.25rem;
    }

    .article-body h3 {
        font-size: 1.125rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .cta-card h2 {
        font-size: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}
