/* ==========================================================================
   ZenAIya Chess Website stylesheet
   ========================================================================== */

:root {
    --bg-color: #0A081F;
    --card-bg: rgba(26, 21, 58, 0.45);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 255, 170, 0.25);
    
    --primary-color: #8A2BE2;
    --accent-color: #00FFAA;
    --accent-hover: #00e699;
    
    --text-main: #FFFFFF;
    --text-secondary: #B0AEC6;
    --text-muted: #8A87A8;
    
    --error-color: #FF4A6B;
    --warn-color: #FFB020;
    --correct-color: #00FFAA;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(0, 255, 170, 0.1) 0%, transparent 45%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    line-height: 1.6;
    color: var(--text-secondary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Main Header Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 8, 31, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-accent {
    color: var(--accent-color);
}

.brand-ai {
    font-family: "Zilla Slab", "Rockwell", "Courier New", Courier, Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.05em;
    margin: 0 -0.02em;
}

.logo-svg {
    filter: drop-shadow(0 0 8px rgba(0, 255, 170, 0.4));
}

.nobr {
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-item:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    padding-top: 160px;
    padding-bottom: 100px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 64px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 550px;
}

.hero-ctas {
    display: flex;
    gap: 20px;
}

.download-badge {
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.download-badge:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Phone Mockup Screen Graphic */
.hero-visual {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.phone-mockup {
    width: 290px;
    height: 590px;
    background: #000;
    border-radius: 40px;
    padding: 12px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(138, 43, 226, 0.3);
    transform: rotateY(-10deg) rotateX(10deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover {
    transform: rotateY(-2deg) rotateX(4deg) translateY(-8px);
}

.screen-frame {
    width: 100%;
    height: 100%;
    background: #100D2B;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 16px;
}

.app-header {
    text-align: center;
    margin-bottom: 20px;
}

.app-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.app-board {
    width: 100%;
    aspect-ratio: 1;
    background: #181439;
    border-radius: 8px;
    margin-bottom: 24px;
    padding: 8px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

.mini-board {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.board-row {
    display: flex;
    flex: 1;
}

.square {
    flex: 1;
}

.square.light {
    background-color: rgba(255, 255, 255, 0.15);
}

.square.dark {
    background-color: rgba(138, 43, 226, 0.25);
}

.app-chat-bubble {
    padding: 14px;
    font-size: 0.8rem;
    border-radius: 12px;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ai-name {
    font-weight: 700;
    color: var(--accent-color);
}

.badge {
    font-size: 0.65rem;
    background: rgba(0, 255, 170, 0.15);
    color: var(--accent-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Features Grid */
.features-section {
    padding: 100px 0;
    background: rgba(10, 8, 31, 0.4);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 40px 32px;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-glow);
    box-shadow: 0 12px 30px -10px rgba(0, 255, 170, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.feature-icon-container {
    display: flex;
    align-items: center;
    height: 40px;
    margin-bottom: 24px;
}

.app-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #00FFAA;
    color: #0A081F;
    padding: 8px 18px;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    box-shadow: 0 4px 12px rgba(0, 255, 170, 0.25);
    user-select: none;
    letter-spacing: -0.01em;
}

.chat-btn-icon {
    fill: #0A081F;
}

.feature-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 0 8px rgba(0, 255, 170, 0.45));
}

.feature-heading {
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.feature-description {
    font-size: 0.95rem;
}

/* Interactive Demo Section */
.demo-section {
    padding: 100px 0;
}

.demo-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    padding: 40px;
    margin-top: 32px;
}

.demo-board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(10, 8, 31, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    aspect-ratio: 1;
}

.demo-board {
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1;
}

.demo-dialogue-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Mock Phone Chat Interface */
.mock-phone-chat {
    background: #140e2b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 380px;
    margin-bottom: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mock-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #100b21;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.mock-back-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.mock-back-btn:hover {
    opacity: 1;
}

.mock-back-btn:focus {
    outline: 2px solid #00FFAA;
    outline-offset: 2px;
}

.mock-chat-header-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mock-ai-status-dot {
    width: 8px;
    height: 8px;
    background-color: #00FFAA;
    border-radius: 50%;
    box-shadow: 0 0 8px #00FFAA;
}

.mock-chat-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.mock-end-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.4;
    cursor: not-allowed;
}

.mock-end-btn:focus {
    outline: 2px solid #00FFAA;
    outline-offset: 2px;
}

.mock-chat-thread {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
    background: #15102f;
}

/* Scrollbar styling for mock chat thread */
.mock-chat-thread::-webkit-scrollbar {
    width: 6px;
}
.mock-chat-thread::-webkit-scrollbar-track {
    background: transparent;
}
.mock-chat-thread::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

/* Chat Bubbles */
.chat-bubble {
    max-width: 85%;
    padding: 12px 14px;
    font-size: 0.92rem;
    line-height: 1.45;
    animation: bubbleFadeIn 0.3s ease forwards;
}

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

.ai-bubble {
    align-self: flex-start;
    background: #2C2C2E;
    border: 1px solid #3A3A3C;
    border-radius: 16px 16px 16px 4px;
    color: #E5E5E7;
}

.user-bubble {
    align-self: flex-end;
    background: #6F4E9E;
    border-radius: 16px 16px 4px 16px;
    color: #FFFFFF;
}

.bubble-name {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9f84ca;
    margin-bottom: 4px;
}

/* Chat Input Bar */
.mock-chat-input-row {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #100b21;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    gap: 8px;
    margin: 0;
    flex-shrink: 0;
}

.mock-chat-input {
    flex: 1;
    height: 38px;
    border-radius: 19px;
    border: none;
    background: #201844;
    padding: 0 16px;
    font-size: 0.88rem;
    color: #FFFFFF;
    outline: none;
    transition: all 0.2s ease;
}

.mock-chat-input:focus {
    background: #291f56;
    box-shadow: 0 0 0 2px #00FFAA;
}

.mock-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.mock-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #201844;
    color: rgba(255, 255, 255, 0.25);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.mock-send-btn:not([disabled]) {
    background: #6F4E9E;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(111, 78, 158, 0.4);
}

/* Typing Dots Animation */
.typing-dots {
    display: flex;
    gap: 6px;
    padding: 4px 6px;
    align-items: center;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: #9f84ca;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite both;
    display: inline-block;
}

.typing-dots span:nth-child(2) {
    animation-delay: .2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.highlights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-left: 4px solid transparent;
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.highlight-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.highlight-item.active {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

#hl-move-1.active {
    border-left-color: #ff4d4d;
    border-color: rgba(255, 77, 77, 0.25) rgba(255, 77, 77, 0.25) rgba(255, 77, 77, 0.25) #ff4d4d;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.08);
}

#hl-move-2.active {
    border-left-color: #ffaa00;
    border-color: rgba(255, 170, 0, 0.25) rgba(255, 170, 0, 0.25) rgba(255, 170, 0, 0.25) #ffaa00;
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.08);
}

#hl-move-3.active {
    border-left-color: #00FFAA;
    border-color: rgba(0, 255, 170, 0.25) rgba(0, 255, 170, 0.25) rgba(0, 255, 170, 0.25) #00FFAA;
    box-shadow: 0 4px 15px rgba(0, 255, 170, 0.08);
}

.hl-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.hl-badge.error {
    background: rgba(255, 74, 107, 0.15);
    color: var(--error-color);
}

.hl-badge.warn {
    background: rgba(255, 176, 32, 0.15);
    color: var(--warn-color);
}

.hl-badge.correct {
    background: rgba(0, 255, 170, 0.15);
    color: var(--correct-color);
}

.hl-text strong {
    color: var(--text-main);
}

/* Chess Board Render Elements */
.board-grid-svg {
    width: 100%;
    height: 100%;
}

.board-square-rect {
    transition: fill 0.3s ease;
}

.board-piece-img {
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* FAQ Section */
.faq-section {
    padding: 100px 0;
    background: rgba(10, 8, 31, 0.3);
    border-top: 1px solid var(--border-color);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    padding: 30px;
}

.faq-question {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.faq-answer {
    font-size: 0.95rem;
}

/* Footer */
.main-footer {
    background: #050411;
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 24px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.link-group h5 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.link-group a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.link-group a:hover {
    color: var(--accent-color);
}

/* Showcase Section */
.chat-showcase-section {
    padding: 100px 0;
    border-bottom: 1px solid var(--border-color);
}

.showcase-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: 64px;
}

.showcase-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 24px;
}

.showcase-subtitle {
    font-size: 1.15rem;
    margin-bottom: 32px;
}

.showcase-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.showcase-bullets li {
    position: relative;
    padding-left: 28px;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.showcase-bullets li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent-color);
    font-weight: 700;
}

.showcase-bullets li strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 2px;
}

.showcase-visual {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.side-phone {
    transform: rotateY(10deg) rotateX(8deg);
}

.side-phone:hover {
    transform: rotateY(2deg) rotateX(4deg) translateY(-8px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-ctas {
        justify-content: center;
    }
    
    .phone-mockup {
        transform: none;
    }
    
    .phone-mockup:hover {
        transform: translateY(-8px);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .demo-container {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 24px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .showcase-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }
    
    .showcase-bullets {
        align-items: center;
        text-align: left;
        max-width: 600px;
        margin: 0 auto;
    }

    .side-phone {
        transform: none;
    }
    
    .side-phone:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
    }
    
    .hero-ctas {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 16px 0;
        gap: 16px;
    }
    
    .nav-menu {
        gap: 20px;
    }
}
