:root {
    /* Core palette */
    --bg-primary:     #050505;
    --bg-secondary:   #0a0a0a;
    --bg-tertiary:    #111111;
    --bg-card:        #0c0c0c;
    --bg-input:       #000000;

    --border-subtle:  rgba(0, 243, 255, 0.15);
    --border-default: rgba(0, 243, 255, 0.3);
    --border-hover:   rgba(0, 243, 255, 0.6);

    --text-primary:   #e0e0e0;
    --text-secondary: #00f3ff;
    --text-muted:     #00a3ff;
    --text-hint:      #333333;

    /* Accent gradient */
    --accent-from:    #00f3ff;
    --accent-via:     #00a3ff;
    --accent-to:      #00f3ff;
    --accent-glow:    rgba(0, 243, 255, 0.15);

    /* Functional */
    --success:        #00f3ff;
    --warning:        #f59e0b;
    --danger:         #ef4444;

    /* Typography */
    --font-sans:      'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --font-mono:      'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Spacing */
    --container-max:  1200px;
    --section-pad:    100px;

    /* Transitions */
    --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast:  150ms;
    --duration-mid:   300ms;
    --duration-slow:  500ms;

    --radius-sm:      0px;
    --radius-md:      0px;
    --radius-lg:      0px;
    --radius-xl:      0px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

::selection {
    background: var(--accent-from);
    color: white;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.05), transparent 70%);
    top: -200px;
    right: -100px;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 163, 255, 0.04), transparent 70%);
    bottom: 0;
    left: -150px;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--duration-mid) var(--ease-out);
}

.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-from);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--duration-fast);
}

.nav-link:hover {
    color: var(--accent-from);
    background: rgba(0, 243, 255, 0.05);
}

.nav-github {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.03);
}

.nav-github:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.06);
}

.hero {
    position: relative;
    z-index: 1;
    padding: 160px 24px 80px;
    text-align: center;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 0;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.3);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-from);
    margin-bottom: 28px;
    animation: fadeInUp 0.6s var(--ease-out) both;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-from);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(36px, 5.5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.gradient-text {
    color: var(--accent-from);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 36px;
    animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 60px;
    animation: fadeInUp 0.6s var(--ease-out) 0.3s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    animation: fadeInUp 0.6s var(--ease-out) 0.4s both;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--accent-from);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-default);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--duration-mid) var(--ease-out);
    outline: none;
}

.btn-primary {
    background: transparent;
    color: var(--accent-from);
    border: 1px solid var(--accent-from);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    color: var(--text-primary);
    background: rgba(0, 243, 255, 0.05);
    border-color: var(--accent-from);
    transform: translateY(-2px);
}

.btn-generate {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 16px;
    background: rgba(0, 243, 255, 0.05);
    color: var(--accent-from);
    border: 1px solid var(--accent-from);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
    margin-top: 8px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-generate:hover {
    transform: translateY(-2px);
    background: rgba(0, 243, 255, 0.15);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.3);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.generator-section {
    position: relative;
    z-index: 1;
    padding: 0 0 var(--section-pad);
}

.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 0;
    padding: 28px;
    transition: border-color var(--duration-mid);
    position: relative;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 1px;
    background: var(--accent-from);
}

.panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 1px;
    background: var(--accent-from);
}

.panel:hover {
    border-color: var(--border-default);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    flex: 1;
}

.panel-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-from);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.label-hint {
    color: var(--text-muted);
    font-weight: 400;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 0;
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    transition: all var(--duration-fast);
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-hint);
}

.form-group input:focus {
    border-color: var(--accent-from);
    box-shadow: 0 0 0 1px var(--accent-from);
}

.form-group input:hover:not(:focus) {
    border-color: var(--border-hover);
}

.form-group input[type="number"] {
    font-family: var(--font-mono);
    font-size: 13px;
}

.form-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 24px 0;
}

.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(0, 243, 255, 0.02);
    border: 1px solid var(--border-default);
    border-radius: 0;
    margin-bottom: 24px;
}

.toggle-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.toggle-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.toggle-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 243, 255, 0.1);
    transition: .4s;
    border: 1px solid var(--border-default);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
}

input:checked + .slider {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--accent-from);
}

input:checked + .slider:before {
    background-color: var(--accent-from);
    box-shadow: 0 0 8px var(--accent-from);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-from);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.panel-output {
    position: sticky;
    top: 88px;
}

.password-counter {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--accent-from);
    padding: 4px 10px;
    border: 1px solid var(--accent-from);
    background: rgba(0, 243, 255, 0.05);
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: var(--text-muted);
}

.placeholder-icon {
    margin-bottom: 16px;
    opacity: 0.3;
}

.output-placeholder p {
    font-size: 14px;
    line-height: 1.6;
}

.output-placeholder strong {
    color: var(--text-secondary);
}

/* Output Toolbar */
.output-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    gap: 8px;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.toolbar-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
}

.toolbar-btn.copied {
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
}

.search-input {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    width: 180px;
    outline: none;
    transition: all var(--duration-fast);
}

.search-input::placeholder {
    color: var(--text-hint);
}

.search-input:focus {
    border-color: var(--accent-from);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    width: 220px;
}

/* Output List */
.output-list-wrapper {
    max-height: 520px;
    overflow-y: auto;
    border-radius: 0;
    border: 1px solid var(--accent-from);
    background: var(--bg-input);
    box-shadow: inset 0 0 20px rgba(0, 243, 255, 0.05);
}

.output-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.output-list-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.output-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.output-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.output-list {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.8;
    padding: 16px;
    color: var(--text-secondary);
}

.output-list .pw-line {
    padding: 2px 8px;
    border-radius: 4px;
    transition: background var(--duration-fast);
    cursor: default;
}

.output-list .pw-line:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.output-list .pw-line .pw-number {
    display: inline-block;
    width: 48px;
    color: var(--text-hint);
    user-select: none;
}

.output-list .highlight {
    background: rgba(0, 243, 255, 0.15);
    color: var(--text-primary);
}

/* ─── Progress Bar ────────────────────────────────────────────── */
.progress-bar-container {
    margin-top: 16px;
    height: 4px;
    border-radius: 0;
    background: rgba(0, 243, 255, 0.05);
    overflow: hidden;
    border: 1px solid var(--border-default);
}

.progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 0;
    background: var(--accent-from);
    box-shadow: 0 0 10px var(--accent-from);
    transition: width var(--duration-fast) linear;
}

/* ─── How It Works Section ────────────────────────────────────── */
.how-section {
    position: relative;
    z-index: 1;
    padding: var(--section-pad) 0;
}

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

.strategy-card {
    padding: 24px;
    border-radius: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    transition: all var(--duration-mid) var(--ease-out);
}

.strategy-card:hover {
    border-color: var(--accent-from);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 243, 255, 0.05);
}

.strategy-icon {
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
    color: var(--accent-from);
}

.strategy-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.strategy-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-subtle);
    padding: 48px 0 32px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 12px;
    max-width: 320px;
}

.footer-disclaimer {
    max-width: 500px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-disclaimer strong {
    color: var(--warning);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--duration-mid) var(--ease-out);
    z-index: 200;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast svg {
    color: var(--success);
}

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

@media (max-width: 1024px) {
    .strategies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 56px;
    }

    .nav-link:not(.nav-github) {
        display: none;
    }

    .hero {
        padding: 120px 16px 60px;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 22px;
    }

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

    .panel-output {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }

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

    .footer-inner {
        flex-direction: column;
    }

    .output-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left {
        flex-wrap: wrap;
    }

    .search-input {
        width: 100%;
    }

    .search-input:focus {
        width: 100%;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
