/* 
 * ETA Creator - Premium UI System
 * Author: N.T.Được
 */

/* Font import removed - Loaded in HTML for better performance */

:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #06b6d4;

    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.8);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Typography */
    --font-primary: 'Be Vietnam Pro', sans-serif;
    --font-heading: 'Inter', sans-serif;

    --border: rgba(148, 163, 184, 0.1);
    --border-highlight: rgba(99, 102, 241, 0.5);

    --gradient-main: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    /* Layout */
    --navbar-height: 70px;
    --max-width: 1000px;
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    border: none;
    outline: none;
    cursor: pointer;
}

/* Background Decoration */
.bg-decoration {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 25%);
}

.particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   PREMIUM NAVBAR
   ======================================== */
.navbar {
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-brand:hover .logo-icon {
    transform: scale(1.05) rotate(-5deg);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-badge {
    font-size: 0.65rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.3));
    padding: 2px 8px;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    width: fit-content;
}

/* Center Navigation */
.nav-center {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link i {
    font-size: 1rem;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Right Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Usage Badge */
.usage-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.15));
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4ade80;
}

.usage-badge i {
    color: #fbbf24;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.user-btn .fa-chevron-down {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .user-btn .fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dropdown-header strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.dropdown-header small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
}

.dropdown-item.gold {
    color: #fbbf24;
}

.dropdown-item.gold:hover {
    background: rgba(251, 191, 36, 0.15);
}

.dropdown-item.vip-status {
    color: #a78bfa;
    cursor: default;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

/* Login/Register Buttons */
.btn-nav-login,
.btn-nav-register {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-nav-login {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
}

.btn-nav-login:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.btn-nav-register {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-nav-register:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

/* Responsive */
@media (max-width: 900px) {
    .nav-center {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .btn-nav-login span,
    .btn-nav-register span {
        display: none;
    }

    .btn-nav-login,
    .btn-nav-register {
        padding: 10px 12px;
    }

    .brand-info {
        display: none;
    }
}

@media (max-width: 600px) {
    .usage-badge span {
        display: none;
    }

    .usage-badge {
        padding: 8px 10px;
    }

    .navbar-container {
        padding: 0 16px;
    }
}

/* Main Wrapper */
.main-wrapper {
    padding: 40px 0 80px;
}

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

/* Hero */
.hero-section {
    margin-bottom: 50px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 16px;
    line-height: 1.2;
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* API Config */
.api-config-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
    transition: var(--transition);
}

.api-config-header {
    padding: 16px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.api-config-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.api-config-body {
    padding: 24px;
    border-top: 1px solid var(--border);
}

.api-input-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.form-input {
    flex: 1;
    min-width: 250px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 8px;
    color: #fff;
    font-family: monospace;
}

.form-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-text {
    background: none;
    color: var(--primary-light);
    text-decoration: underline;
    font-size: 0.9rem;
}

/* Collapsed State */
.api-config-wrapper.collapsed .api-config-body {
    display: none;
}

.api-config-wrapper.collapsed .transition-icon {
    transform: rotate(-90deg);
}

.transition-icon {
    transition: var(--transition);
}

/* WIZARD CONTAINER */
.wizard-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* Wizard Steps Header */
.wizard-steps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.4);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    opacity: 0.5;
    transition: var(--transition);
    cursor: pointer;
    /* Allow clicking */
}

.step-item:hover {
    opacity: 0.8;
}

.step-item.active {
    opacity: 1;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
}

.step-item.active .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-dark);
}

.step-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: -20px 10px 0;
}

/* Wizard Body */
.wizard-content {
    padding: 40px;
    min-height: 400px;
}

/* Panels */
.wizard-panel {
    display: none;
    margin-bottom: 20px;
    animation: slideIn 0.4s ease;
}

.wizard-panel.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-header {
    text-align: center;
    margin-bottom: 40px;
}

.panel-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Form Elements */
.textarea-wrapper {
    position: relative;
}

.form-textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.6;
    transition: var(--transition);
    resize: vertical;
}

.form-textarea:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
}

.char-count {
    text-align: right;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Category Cards */
.category-selection-row {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.category-box {
    flex: 1;
    max-width: 350px;
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.category-box input {
    display: none;
}

.category-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
}

.icon-glow {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    transition: var(--transition);
}

.game-glow {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.5);
}

.manage-glow {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    box-shadow: 0 10px 40px -10px rgba(236, 72, 153, 0.5);
}

.category-box h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.category-box p {
    color: var(--text-muted);
}

.category-box .check-mark {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.border-gradient {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: var(--gradient-main);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
}

.category-box input:checked~.border-gradient {
    opacity: 1;
}

.category-box input:checked~.check-mark {
    opacity: 1;
    transform: scale(1);
}

/* Subtype Grid */
.subtype-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.subtype-card {
    cursor: pointer;
}

.subtype-card input {
    display: none;
}

.subtype-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.subtype-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}

.subtype-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.subtype-card:hover .subtype-inner {
    background: rgba(255, 255, 255, 0.06);
}

.subtype-card input:checked+.subtype-inner {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

/* Chips */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modern-chip {
    cursor: pointer;
}

.modern-chip input {
    display: none;
}

.chip-content {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    transition: var(--transition);
    font-size: 0.95rem;
}

.modern-chip input:checked+.chip-content {
    background: #fff;
    color: var(--primary-dark);
    border-color: #fff;
    font-weight: 600;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-column {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.col-title {
    margin-bottom: 16px;
    color: var(--primary-light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
}

.feature-row input {
    display: none;
}

.chk-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 6px;
    position: relative;
    transition: var(--transition);
}

.feature-row input:checked+.chk-box {
    background: var(--primary);
    border-color: var(--primary);
}

.feature-row input:checked+.chk-box::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.feat-text {
    color: var(--text-muted);
    transition: var(--transition);
}

.feature-row input:checked~.feat-text {
    color: #fff;
}

/* Tech Options */
.tech-options-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tech-option-card {
    cursor: pointer;
    position: relative;
    margin: 0;
    width: 100%;
    display: block;
}

.tech-option-card input {
    display: none;
}

.tech-card-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: var(--transition);
}

.tech-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
}

.tech-text h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.tech-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.selection-border {
    position: absolute;
    inset: 0;
    border: 2px solid var(--primary);
    border-radius: 16px;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.tech-option-card input:checked~.selection-border {
    opacity: 1;
}

.tech-option-card input:checked .tech-icon {
    background: var(--gradient-main);
    color: #fff;
}

.rec-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* Footer Panel */
.panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.panel-footer.right {
    justify-content: flex-end;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 14px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-gradient {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

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

.btn-outline:hover {
    border-color: #fff;
    color: #fff;
}

.btn-glow-anim {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

/* Result Area */
.result-wrapper {
    margin-top: 40px;
    background: #000;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.result-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-body {
    padding: 0;
}

.code-block {
    background: #0d1117;
    color: #e6edf3;
    padding: 24px;
    font-family: 'Fira Code', monospace;
    overflow-x: auto;
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.7;
    max-height: 600px;
    overflow-y: auto;
}

.tool-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tool-btn.primary {
    background: var(--primary);
}

.tool-btn.bundle {
    background: linear-gradient(135deg, #10b981, #059669);
    font-weight: 600;
}

.tool-btn.bundle:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-backdrop.show {
    opacity: 1;
}

.modal-container {
    background: #1e293b;
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    transform: scale(0.9);
    transition: transform 0.3s;
    padding: 0;
    overflow: hidden;
}

.modal-backdrop.show .modal-container {
    transform: scale(1);
}

.modal-container.small {
    max-width: 400px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    color: var(--text-muted);
    font-size: 24px;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Guide Content */
.guide-step-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: center;
}

.guide-step-item .num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--text-muted);
}

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

.bg-dark {
    background: var(--bg-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

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

    .category-selection-row {
        flex-direction: column;
    }

    .category-box {
        max-width: 100%;
    }

    .wizard-steps-header {
        display: none;
    }

    /* Hide steps on mobile for space */
    .wizard-content {
        padding: 20px;
    }

    .nav-actions span {
        display: none;
    }
}

/* Loading & Toast Styles */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-screen p {
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1e293b;
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(100px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    font-weight: 500;
}

.toast-notification.show {
    transform: translateY(0);
}

/* Result Instruction Box */
.result-instruction {
    background: rgba(16, 185, 129, 0.1);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.instruct-icon {
    width: 44px;
    height: 44px;
    background: #10b981;
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.instruct-content h4 {
    color: #34d399;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.instruct-content ol {
    padding-left: 20px;
    margin: 0;
    color: #e2e8f0;
    font-size: 1rem;
}

.instruct-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.instruct-content a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.instruct-content a:hover {
    color: #34d399;
}

/* Idea Suggestions (Step 1) */
.suggestions-label {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.text-warning {
    color: #facc15;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sug-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #cbd5e1;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.sug-chip:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.sug-chip i {
    color: var(--primary);
}

/* AI Idea Button & Tools */
.idea-tools-wrapper {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.tools-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-ai-chat {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-ai-chat:hover {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    transform: translateY(-2px);
}

/* Tabs */
.template-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.t-tab {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: var(--transition);
}

.t-tab:hover,
.t-tab.active {
    background: #fff;
    color: #000;
    border-color: #fff;
    font-weight: 600;
}

/* Dynamic Chips */
.suggestion-chips.scrollable {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.template-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.template-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.t-icon {
    width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.t-info h5 {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #e2e8f0;
}

.t-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Chat Modal Styles */
.chat-modal-size {
    width: 95%;
    max-width: 600px;
    height: 80vh;
    /* Increased height */
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.chat-header-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.status-online {
    font-size: 0.75rem;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #0f172a;
}

.chat-msg {
    display: flex;
    max-width: 85%;
}

.chat-msg.ai {
    align-self: flex-start;
}

.chat-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
    /* Better line height */
    white-space: pre-wrap;
    /* Preserve line breaks */
}

.chat-msg.ai .msg-content {
    background: #1e293b;
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-msg.user .msg-content {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: #1e293b;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-wrapper {
    display: flex;
    gap: 10px;
}

.input-wrapper input {
    flex: 1;
    background: #0f172a;
    border: 1px solid var(--border);
    color: #fff;
    padding: 10px 16px;
    border-radius: 20px;
}

.btn-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    flex-shrink: 0;
}

.btn-summarize {
    width: 100%;
    padding: 10px;
    background: #10b981;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-summarize:hover {
    background: #059669;
}

/* =============================
   USER AUTHENTICATION STYLES
   ============================= */

.user-info-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    color: #4ade80;
    font-size: 0.85rem;
    font-weight: 600;
}

.user-info-badge i {
    color: #facc15;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 24px;
    color: #e2e8f0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.user-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.user-btn i.fa-user-circle {
    font-size: 1.2rem;
    color: var(--primary);
}

.user-btn i.fa-chevron-down {
    font-size: 0.7rem;
    color: #64748b;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.user-dropdown:hover .user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #e2e8f0;
    text-decoration: none;
    transition: var(--transition);
}

.user-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f87171;
}

.user-menu a i {
    width: 16px;
    text-align: center;
}

.btn-login-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 24px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-login-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* =============================================
   Hero CTA Buttons - Prominent Call-to-Action
   ============================================= */
.hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-cta-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

.btn-cta-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5);
}

.btn-cta-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
    animation: goldPulse 2s infinite;
}

.btn-cta-gold:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.5);
    animation: none;
}

@keyframes goldPulse {

    0%,
    100% {
        box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
    }

    50% {
        box-shadow: 0 8px 35px rgba(245, 158, 11, 0.6);
    }
}

.hero-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .hero-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-cta {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* Upgrade Link in Dropdown */
.upgrade-link {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #fff !important;
    font-weight: 600;
}

.upgrade-link:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

/* =============================================
   LIVE CODE TESTER STYLES
   ============================================= */
.code-tester-wrapper {
    margin-top: 30px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.code-tester-header {
    padding: 16px 24px;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.code-tester-header:hover {
    background: rgba(99, 102, 241, 0.15);
}

.code-tester-header .badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.code-tester-body {
    padding: 24px;
}

.code-tester-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .code-tester-grid {
        grid-template-columns: 1fr;
    }
}

.code-input-area,
.preview-area {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}

.code-input-header,
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    color: #94a3b8;
}

.code-input-header i,
.preview-header i {
    margin-right: 6px;
    color: var(--primary);
}

.code-input-tools,
.preview-tools {
    display: flex;
    gap: 6px;
}

.btn-mini {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition);
}

.btn-mini:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--primary);
}

.btn-mini.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-mini.primary:hover {
    background: #4f46e5;
}

.code-textarea {
    width: 100%;
    min-height: 400px;
    background: #0d1117;
    border: none;
    padding: 16px;
    color: #e6edf3;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.code-textarea::placeholder {
    color: #4b5563;
}

.preview-frame-wrapper {
    position: relative;
    min-height: 400px;
    background: #fff;
}

.preview-frame {
    width: 100%;
    height: 400px;
    border: none;
    background: #fff;
}

.preview-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    padding: 20px;
}

.preview-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.preview-placeholder p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.code-tester-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.btn-run {
    padding: 12px 32px !important;
    font-size: 1rem !important;
}

.btn-run i {
    margin-right: 8px;
}

.code-tester-tips {
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
}

.code-tester-tips p {
    margin: 0;
    font-size: 0.9rem;
    color: #fcd34d;
}

.code-tester-tips i {
    margin-right: 6px;
}

/* Fullscreen Mode */
.preview-area.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    border-radius: 0;
    border: none;
}

.preview-area.fullscreen .preview-frame-wrapper {
    height: calc(100vh - 50px);
}

.preview-area.fullscreen .preview-frame {
    height: 100%;
}

/* Transition Icon */
.transition-icon {
    transition: transform 0.3s ease;
}

.code-tester-wrapper.expanded .transition-icon {
    transform: rotate(180deg);
}

/* =============================================
   BRAND IDENTITY SECTION STYLES
   ============================================= */
.brand-identity-section {
    margin-top: 24px;
    background: rgba(250, 204, 21, 0.05);
    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 16px;
    overflow: hidden;
}

.brand-header {
    padding: 16px 20px;
    background: rgba(250, 204, 21, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.brand-header:hover {
    background: rgba(250, 204, 21, 0.15);
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #fcd34d;
}

.brand-title i {
    font-size: 1.1rem;
}

.badge-optional {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-body {
    padding: 20px;
    border-top: 1px solid rgba(250, 204, 21, 0.1);
}

.brand-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .brand-inputs {
        grid-template-columns: 1fr;
    }
}

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

.brand-input-group.full-width {
    grid-column: 1 / -1;
}

.brand-input-group label {
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-input-group label i {
    color: #facc15;
    width: 16px;
}

.brand-input-group .form-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(250, 204, 21, 0.2);
    padding: 12px 16px;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: var(--transition);
}

.brand-input-group .form-input:focus {
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.15);
    outline: none;
}

.brand-input-group .form-input::placeholder {
    color: #64748b;
}

.brand-preview {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 16px;
}

.preview-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-box {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.preview-text {
    color: #94a3b8;
    font-size: 0.9rem;
}

.preview-text strong {
    color: #fcd34d;
}

.brand-identity-section.expanded .transition-icon {
    transform: rotate(180deg);
}