/* ==========================================================================
   KeyMemo Web Design System & Stylesheet
   Created for: KeyMemo (macOS License Manager App)
   Design Philosophy: Apple Minimalist Tech, Dark Mode Elegance, Smooth Micro-interactions
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Variables & Design System
   -------------------------------------------------------------------------- */
:root {
    /* Color Palette */
    --color-bg-pure: #07090e;
    --color-bg-base: #0b0f19;
    --color-bg-card: rgba(255, 255, 255, 0.03);
    --color-bg-card-hover: rgba(255, 255, 255, 0.06);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.18);
    
    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: #9ca3af;
    --color-text-tertiary: #6b7280;
    --color-text-muted: #4b5563;
    
    /* Brand Accents & Gradients */
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --accent-gold: #f59e0b;
    --accent-green: #10b981;
    --accent-pink: #ec4899;
    
    --gradient-purple-blue: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --gradient-blue-purple: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-text: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
    --gradient-purple-glow: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    --gradient-blue-glow: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(0, 0, 0, 0) 70%);

    /* Fonts & Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Outfit', var(--font-sans);
    --font-mono: 'SF Mono', Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    
    /* Layout Constants */
    --max-width: 1200px;
    --header-height: 76px;
    --radius-card: 24px;
    --radius-button: 9999px;
    --radius-window: 12px;
    
    /* Transition Timings */
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Global Reset & Base Setup
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg-pure);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    background-color: var(--color-bg-base);
    background-image: 
        radial-gradient(circle at 20% 15%, rgba(168, 85, 247, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 65%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(11, 15, 25, 1) 0%, rgba(7, 9, 14, 1) 100%);
    background-attachment: fixed;
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul, ol {
    list-style: none;
}

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

button, input, textarea {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

code, pre, .font-code {
    font-family: var(--font-mono);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.hidden {
    display: none !important;
}

/* Decorative Background Glows */
.bg-glow-purple {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--gradient-purple-glow);
    top: -200px;
    left: -200px;
    z-index: -1;
    pointer-events: none;
}

/* Section Common Styles */
section {
    padding: 100px 0;
    position: relative;
}

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

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-subtitle {
    color: var(--color-text-secondary);
    font-size: clamp(1rem, 1.5vw, 1.125rem);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-pure);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   3. Buttons & Interactive Elements
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-button);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-purple-blue);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4), 0 0 50px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: background 0.3s ease;
}

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

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.header-logo {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-group:hover .header-logo {
    transform: rotate(15deg) scale(1.05);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
}

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

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--gradient-purple-blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
    color: var(--color-text-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-download-nav {
    padding: 8px 20px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
}

.btn-download-nav:hover {
    background: var(--gradient-purple-blue);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 960px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--color-text-primary);
}

.gradient-text {
    background: var(--gradient-purple-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-title-en {
    display: block;
    font-size: 0.35em;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 18px;
    background: linear-gradient(135deg, #c084fc 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.2vw, 1.25rem);
    color: var(--color-text-secondary);
    max-width: 780px;
    margin: 0 auto 48px;
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
}

/* macOS Command Box */
.terminal-box {
    width: 100%;
    max-width: 460px;
    background: rgba(13, 17, 28, 0.75);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: left;
    transition: border-color var(--transition-normal);
}

.terminal-box:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.terminal-header {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    font-size: 11px;
    color: var(--color-text-tertiary);
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-sans);
    font-weight: 500;
}

.terminal-body {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
}

.terminal-prompt {
    color: var(--accent-purple);
    margin-right: 12px;
    user-select: none;
    font-weight: bold;
}

#brew-command {
    color: #e2e8f0;
    flex-grow: 1;
    font-weight: 500;
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.btn-copy:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-copy:active {
    transform: scale(0.95);
}

/* --------------------------------------------------------------------------
   6. Bento Grid Features Section
   -------------------------------------------------------------------------- */
.features-section {
    position: relative;
    background: radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.03) 0%, transparent 60%);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

/* Base Bento Card */
.bento-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 40px;
    display: flex;
    overflow: hidden;
    position: relative;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.06), transparent 40%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Card Content Structure */
.card-info {
    display: flex;
    flex-direction: column;
    z-index: 2;
    position: relative;
}

.card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-purple);
}

.card-tag {
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* Tag Specific Colors */
.tag-secure { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; }
.tag-sys { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.tag-visual { background: rgba(236, 72, 153, 0.15); color: #fbcfe8; }
.tag-ai { background: rgba(245, 158, 11, 0.15); color: #fde68a; }
.tag-safety { background: rgba(16, 185, 129, 0.15); color: #a7f3d0; }

.card-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card-desc {
    color: var(--color-text-secondary);
    font-size: 14.5px;
    line-height: 1.6;
}

.card-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grid Layout Matrix mapping */
.bento-card-lg {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.bento-card-lg .card-info {
    width: 55%;
    padding-right: 20px;
}

.bento-card-lg .card-visual {
    width: 40%;
    height: 100%;
}

.bento-card-md {
    grid-column: span 1;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card-md .card-visual {
    margin-top: 30px;
    height: 140px;
}

/* Card 5 - Large layout in grid but marked sm in class */
.bento-card-sm.bento-backup {
    grid-column: span 3;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.bento-card-sm.bento-backup .card-info {
    width: 60%;
}

.bento-card-sm.bento-backup .card-visual {
    width: 30%;
}

/* --------------------------------------------------------------------------
   7. Bento Card Specific Visualizations & Keyframes
   -------------------------------------------------------------------------- */

/* Card 1: Shield Security Glow */
.shield-animation {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shield-core {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(59, 130, 246, 0.4));
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.3);
    z-index: 2;
}

.shield-ring {
    position: absolute;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 50%;
    animation: shieldGlow 3s infinite linear;
}

.shield-ring.ring-1 {
    width: 100px;
    height: 100px;
    animation-delay: 0s;
}

.shield-ring.ring-2 {
    width: 130px;
    height: 130px;
    animation-delay: 1.5s;
}

@keyframes shieldGlow {
    0% {
        transform: scale(0.85);
        opacity: 1;
    }
    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

/* Card 2: Touch ID Ring */
.touchid-scanner {
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(59, 130, 246, 0.3);
    color: var(--accent-blue);
    animation: touchPulse 2.5s infinite alternate ease-in-out;
}

.fingerprint-svg {
    width: 50px;
    height: 50px;
    transition: transform var(--transition-normal);
}

.bento-touchid:hover .fingerprint-svg {
    transform: scale(1.1);
}

@keyframes touchPulse {
    0% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.2);
    }
    100% {
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
        border-color: rgba(59, 130, 246, 0.6);
    }
}

/* Card 3: High-Res Icons Stack */
.icons-stack {
    position: relative;
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
}

.mock-app-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    left: calc(50% - 70px);
    transform: rotate(-12deg) translateY(10px);
    z-index: 1;
}

.icon-2 {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    left: calc(50% - 30px);
    transform: translateY(0);
    z-index: 3;
    width: 64px;
    height: 64px;
}

.icon-3 {
    background: linear-gradient(135deg, #f472b6, #db2777);
    left: calc(50% + 10px);
    transform: rotate(12deg) translateY(10px);
    z-index: 2;
}

.bento-icons:hover .icon-1 {
    transform: rotate(-20deg) translate(-15px, 5px);
}

.bento-icons:hover .icon-2 {
    transform: translateY(-8px) scale(1.05);
}

.bento-icons:hover .icon-3 {
    transform: rotate(20deg) translate(15px, 5px);
}

/* Card 4: OCR Scanner Flow */
.ocr-transition-box {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.ocr-source {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1.5px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.ocr-source::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-blue) 0%, var(--accent-blue) 3px, transparent 3px);
    pointer-events: none;
    animation: ocrScanOptimized 2.5s infinite linear;
}

@keyframes ocrScanOptimized {
    0% { transform: translateY(-100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

.ocr-source .title {
    font-size: 10px;
    color: var(--color-text-tertiary);
    margin-bottom: 6px;
}

.ocr-source .line {
    font-size: 11px;
    color: #a5b4fc;
}

.ocr-arrow {
    display: flex;
    align-items: center;
    color: var(--accent-blue);
    animation: arrowBlink 1.5s infinite alternate ease-in-out;
}

@keyframes arrowBlink {
    0% { transform: translateX(-3px); opacity: 0.5; }
    100% { transform: translateX(3px); opacity: 1; }
}

.ocr-result {
    flex: 1;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.ocr-result .key-label {
    font-size: 9px;
    color: var(--accent-green);
    font-weight: bold;
    text-transform: uppercase;
}

.ocr-result .key-value {
    font-size: 11px;
    color: #ffffff;
    word-break: break-all;
    margin-top: 4px;
}

/* Card 5: Auto Backup Disk Animation */
.backup-graphic {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disk-icon {
    color: var(--accent-green);
    animation: diskBounce 2s infinite alternate ease-in-out;
}

@keyframes diskBounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.backup-graphic::after {
    content: '';
    position: absolute;
    top: 65px;
    left: 20px;
    width: 60px;
    height: 12px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    filter: blur(4px);
    z-index: 1;
    animation: diskShadow 2s infinite alternate ease-in-out;
}

@keyframes diskShadow {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(0.8); opacity: 0.3; }
}

/* --------------------------------------------------------------------------
   8. macOS Simulation Window
   -------------------------------------------------------------------------- */
.demo-section {
    background: radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 60%);
}

.macos-window {
    width: 100%;
    background: rgba(18, 22, 35, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-window);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(168, 85, 247, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.window-titlebar {
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 20px;
    background: rgba(27, 32, 51, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.window-controls {
    display: flex;
    gap: 8px;
    position: absolute;
    left: 20px;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control-dot.close { background: #ff5f56; }
.control-dot.minimize { background: #ffbd2e; }
.control-dot.zoom { background: #27c93f; }

.window-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 8px;
    margin: 0 auto;
    gap: 4px;
}

.tab-btn {
    background: transparent;
    color: var(--color-text-secondary);
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: #ffffff;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.window-body {
    min-height: 480px;
    position: relative;
    background: rgba(13, 17, 27, 0.4);
}

/* Standard Panels */
.mock-panel {
    display: none;
    height: 100%;
}

.mock-panel.active {
    display: block;
    animation: panelFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 8.1 PANEL 1: Licenses Homepage layout */
.mock-app-layout {
    display: flex;
    height: 480px;
}

.mock-sidebar {
    width: 220px;
    background: rgba(20, 25, 41, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.search-field {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 20px;
}

.search-icon {
    width: 14px;
    height: 14px;
    color: var(--color-text-tertiary);
    margin-right: 8px;
}

.mock-search-input {
    font-size: 12px;
    width: 100%;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--color-text-secondary);
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.menu-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
}

.menu-item.active .menu-badge {
    background: rgba(168, 85, 247, 0.2);
    color: #d8b4fe;
}

.mock-main-view {
    flex-grow: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.view-title {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-display);
}

.mock-btn-action {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.15);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mock-btn-action:hover {
    background: rgba(168, 85, 247, 0.2);
}

.license-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* License Cards */
.mock-license-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
}

.card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}

.app-icon-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    font-family: var(--font-display);
}

/* App Specific Backgrounds */
.sketch-bg { background: linear-gradient(135deg, #fbbf24, #d97706); }
.tower-bg { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.cleanmymac-bg { background: linear-gradient(135deg, #ec4899, #be185d); }
.alfred-bg { background: linear-gradient(135deg, #78716c, #44403c); }

.app-meta {
    display: flex;
    flex-direction: column;
}

.app-name {
    font-size: 13.5px;
    font-weight: 600;
}

.app-version {
    font-size: 10px;
    color: var(--color-text-tertiary);
}

.status-pill {
    position: absolute;
    right: 0;
    top: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.detail-row .label {
    color: var(--color-text-tertiary);
}

.detail-row .val {
    color: var(--color-text-secondary);
}

.detail-row .text-orange {
    color: #fbbf24;
}

/* 8.2 PANEL 2: OCR Recognition Layout */
.mock-recognition-layout {
    display: flex;
    height: 480px;
}

.recognition-left {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.rec-panel-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rec-editor-mock {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 16px;
    overflow-y: auto;
}

.email-mock-text {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.6;
}

.email-mock-text strong {
    color: #ffffff;
}

.drop-helper-text {
    font-size: 11px;
    color: var(--color-text-tertiary);
    text-align: center;
    margin-top: 12px;
    padding: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.recognition-right {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mock-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-tertiary);
}

.form-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.mock-form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #ffffff;
}

.ai-detected-tag {
    position: absolute;
    right: 8px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #d8b4fe;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
}

.form-actions {
    margin-top: 10px;
}

.mock-btn-primary {
    background: var(--gradient-purple-blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    width: 100%;
    cursor: pointer;
}

.mock-btn-primary:hover {
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* 8.3 PANEL 3: High-res Icon Modifier Layout */
.mock-icon-modifier-layout {
    display: flex;
    height: 480px;
}

.modifier-left {
    width: 260px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.modifier-search {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-input-group {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 8px 12px;
}

.icon-source-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-item {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
}

.source-item.active {
    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.05);
}

.source-title {
    font-size: 11.5px;
    font-weight: 600;
    display: block;
    color: #ffffff;
}

.source-subtitle {
    font-size: 9.5px;
    color: var(--color-text-tertiary);
    margin-top: 2px;
    display: block;
}

.modifier-right {
    flex-grow: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.icon-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.icon-result-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.icon-result-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.icon-result-item.selected {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.04);
}

.preview-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
}

.cleanmymac-logo-light {
    background: linear-gradient(135deg, #f472b6, #ec4899);
}

.cleanmymac-icns {
    background: linear-gradient(135deg, #ec4899, #be185d);
    opacity: 0.8;
}

.preview-meta {
    font-size: 10px;
    color: var(--color-text-secondary);
}

.modifier-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.mock-btn-secondary {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    font-size: 11px;
    font-weight: 500;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
}

.mock-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------------------------------------
   9. Installation & Guides
   -------------------------------------------------------------------------- */
.installation-section {
    background: radial-gradient(circle at 10% 50%, rgba(59, 130, 246, 0.02) 0%, transparent 50%);
}

.installation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.install-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform var(--transition-normal), border-color var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.install-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.install-card-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.install-card-desc {
    color: var(--color-text-secondary);
    font-size: 14.5px;
    margin-bottom: 24px;
    flex-grow: 1;
}

.code-block-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.install-code-snippet {
    font-size: 13.5px;
    color: #e2e8f0;
}

.install-tips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.install-tips li {
    font-size: 12.5px;
    color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   10. FAQ Accordion Section
   -------------------------------------------------------------------------- */
.faq-section {
    position: relative;
}

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

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item[open] {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(168, 85, 247, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.faq-question {
    padding: 22px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: color var(--transition-fast);
}

/* Remove default triangular arrow marker */
.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: #ffffff;
}

.faq-icon-arrow {
    position: relative;
    width: 20px;
    height: 20px;
    transition: transform var(--transition-normal);
}

.faq-icon-arrow::before,
.faq-icon-arrow::after {
    content: '';
    position: absolute;
    background-color: var(--color-text-secondary);
    transition: transform var(--transition-normal), background-color var(--transition-normal);
}

/* Drawing a plus (+) sign that turns into a minus (-) or rotates */
.faq-icon-arrow::before {
    top: 9px;
    left: 4px;
    width: 12px;
    height: 2px;
}

.faq-icon-arrow::after {
    top: 4px;
    left: 9px;
    width: 2px;
    height: 12px;
}

/* Open states */
.faq-item[open] .faq-question {
    color: #ffffff;
}

.faq-item[open] .faq-icon-arrow {
    transform: rotate(45deg);
}

.faq-item[open] .faq-icon-arrow::before,
.faq-item[open] .faq-icon-arrow::after {
    background-color: #c084fc;
}

.faq-answer {
    padding: 0 28px 22px;
    color: var(--color-text-secondary);
    font-size: 14.5px;
    line-height: 1.6;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.faq-answer p {
    margin-bottom: 12px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer strong {
    color: #ffffff;
}

.lang-zh {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 12px;
}

.lang-en {
    padding-top: 4px;
}

/* --------------------------------------------------------------------------
   11. Footer Section
   -------------------------------------------------------------------------- */
.site-footer {
    background: rgba(7, 9, 14, 0.8);
    border-top: 1px solid var(--color-border);
    padding: 60px 0;
    color: var(--color-text-secondary);
    font-size: 14px;
}

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

.footer-left {
    max-width: 320px;
}

.footer-logo {
    opacity: 0.9;
}

.footer-left .logo-group {
    margin-bottom: 16px;
}

.copyright {
    font-size: 12px;
    color: var(--color-text-tertiary);
    line-height: 1.7;
}

.footer-right {
    display: flex;
    gap: 80px;
}

.footer-link-column h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 13.5px;
}

.footer-links a:hover {
    color: #ffffff;
}

.inactive-link {
    cursor: default;
}
.inactive-link:hover {
    color: var(--color-text-secondary) !important;
}

/* --------------------------------------------------------------------------
   12. Fully Responsive Design & Adaptability
   -------------------------------------------------------------------------- */

/* Tablet Optimization (iPad portrait/landscape) */
@media (max-width: 1024px) {
    .container {
        padding-left: 32px;
        padding-right: 32px;
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bento-card-lg {
        grid-column: span 2;
    }
    
    .bento-card-md {
        grid-column: span 1;
    }
    
    .bento-card-sm.bento-backup {
        grid-column: span 2;
    }
    
    .footer-right {
        gap: 40px;
    }
}

/* Mobile Screen Reductions & Adjustments */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .site-header {
        height: 64px;
    }
    
    .main-nav {
        display: none; /* Hide primary links or can implement toggle */
    }
    
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title-en {
        letter-spacing: 0.1em;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .bento-card,
    .bento-card-lg,
    .bento-card-md,
    .bento-card-sm.bento-backup {
        grid-column: span 1;
        flex-direction: column;
        padding: 30px;
    }
    
    .bento-card-lg .card-info,
    .bento-card-sm.bento-backup .card-info {
        width: 100%;
        padding-right: 0;
        margin-bottom: 24px;
    }
    
    .bento-card-lg .card-visual,
    .bento-card-sm.bento-backup .card-visual {
        width: 100%;
        justify-content: center;
    }
    
    .ocr-transition-box {
        flex-direction: column;
    }
    
    .ocr-arrow {
        transform: rotate(90deg);
        animation: arrowBlinkVertical 1.5s infinite alternate ease-in-out;
    }
    
    @keyframes arrowBlinkVertical {
        0% { transform: rotate(90deg) translateX(-3px); opacity: 0.5; }
        100% { transform: rotate(90deg) translateX(3px); opacity: 1; }
    }
    
    .macos-window {
        height: auto;
    }
    
    .window-titlebar {
        flex-direction: column;
        height: auto;
        padding: 16px 20px;
        gap: 12px;
    }
    
    .window-controls {
        position: static;
        align-self: flex-start;
    }
    
    .window-tabs {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 10px;
        font-size: 11.5px;
    }
    
    .mock-app-layout,
    .mock-recognition-layout,
    .mock-icon-modifier-layout {
        flex-direction: column;
        height: auto;
    }
    
    .mock-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .license-grid {
        grid-template-columns: 1fr;
    }
    
    .recognition-left {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        height: 240px;
    }
    
    .modifier-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .icon-result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .installation-grid {
        grid-template-columns: 1fr;
    }
    
    .install-card {
        padding: 30px;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-right {
        flex-direction: column;
        gap: 30px;
    }
}
