/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Interactive Navigation Styles */
.main-nav {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(139, 124, 248, 0.1);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

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

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.brand-link:hover {
    color: var(--wisteria-primary);
    transform: translateY(-1px);
}

.brand-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(139, 124, 248, 0.2));
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer !important;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1001;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    pointer-events: auto !important;
    background: transparent;
    border: none;
    outline: none;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wisteria-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--wisteria-primary);
    background: var(--lavender-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 124, 248, 0.15);
}

.nav-link.active {
    color: var(--wisteria-primary);
    background: linear-gradient(135deg, var(--lavender-light), var(--wisteria-light));
    box-shadow: 0 2px 8px rgba(139, 124, 248, 0.2);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, var(--wisteria-primary), var(--wisteria-secondary));
    border-radius: 2px;
}

.nav-icon {
    font-size: 1.1rem;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin-left: 0.25rem;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    border-radius: 0.75rem;
    box-shadow: 0 8px 25px rgba(139, 124, 248, 0.15);
    border: 1px solid var(--gray-200);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

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

.dropdown-link {
    display: block;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    margin: 0 0.5rem;
}

.dropdown-link:hover {
    color: var(--wisteria-primary);
    background: var(--lavender-light);
    transform: translateX(4px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 20px rgba(139, 124, 248, 0.1);
        border-top: 1px solid var(--gray-200);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--gray-100);
    }

    .nav-link {
        padding: 1rem 1.5rem;
        justify-content: flex-start;
        border-radius: 0;
        margin: 0;
    }

    .nav-link:hover {
        background: var(--lavender-light);
        transform: none;
        box-shadow: none;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--gray-50);
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-link {
        padding: 0.75rem 2rem;
        border-bottom: 1px solid var(--gray-200);
    }

    .dropdown-link:last-child {
        border-bottom: none;
    }

    .nav-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .nav-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
        height: 60px;
    }

    .brand-text {
        display: none;
    }

    .nav-link {
        padding: 0.875rem 1rem;
    }

    .nav-icon {
        font-size: 1.2rem;
    }

    .nav-text {
        font-size: 0.9rem;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient, linear-gradient(135deg, #f8f5ff 0%, #fae9fb 50%, #f0e6ff 100%));
    color: #1a1920;
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Color variables - Wisteria Bloom theme */
:root {
    --wisteria-primary: #8b7cf8;
    --wisteria-secondary: #a78bfa;
    --wisteria-accent: #c4b5fd;
    --wisteria-light: #ddd6fe;
    --wisteria-dark: #6d28d9;
    --lavender: #e9d5ff;
    --lavender-light: #faf5ff;
    --lavender-dark: #a855f7;
    --gray-50: #fafaf9;
    --gray-100: #f5f5f4;
    --gray-200: #e7e5e4;
    --gray-300: #d6d3d1;
    --gray-400: #a8a29e;
    --gray-500: #78716c;
    --gray-600: #57534e;
    --gray-700: #403e3b;
    --gray-800: #292524;
    --gray-900: #1d1a16;
    --white: #ffffff;
    --success: #059669;
    --error: #dc2626;
    --warning: #d97706;
    --glow: rgba(139, 124, 248, 0.15);
}

/* Layout */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.micro-tagline {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.title {
    font-size: 2.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--wisteria-primary), var(--wisteria-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
}

.subtitle {
    font-size: 1rem;
    color: var(--gray-600);
    font-weight: 400;
}

/* Card */
.card {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(139, 124, 248, 0.1),
                0 10px 10px -5px rgba(139, 124, 248, 0.04);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 40px -10px rgba(139, 124, 248, 0.15),
                0 10px 20px -5px rgba(139, 124, 248, 0.08);
    transform: translateY(-2px);
}

/* Steps */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 0.5rem;
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.5;
    font-size: 0.75rem;
}

.step-number {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step-label {
    text-align: center;
    color: var(--gray-600);
}

.step-active .step-number {
    border-color: var(--wisteria-primary);
    background: linear-gradient(135deg, var(--wisteria-primary), var(--wisteria-secondary));
    color: var(--white);
}

.step-active {
    opacity: 1;
}

.step-done {
    opacity: 0.9;
}

.step-done .step-number {
    border-color: var(--success);
    background: var(--success);
    color: var(--white);
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--gray-800);
}

.input:focus {
    outline: none;
    border-color: var(--wisteria-primary);
    box-shadow: 0 0 0 3px rgba(139, 124, 248, 0.08);
    transform: translateY(-1px);
}

.input::placeholder {
    color: var(--gray-400);
}

.input-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--gray-500) 50%),
                      linear-gradient(135deg, var(--gray-500) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 13px) calc(50% - 3px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.5rem;
    cursor: pointer;
}

.helper-text {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    position: relative;
    padding: 0.9rem 1.8rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, var(--wisteria-primary), var(--wisteria-secondary));
    color: var(--white);
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--wisteria-secondary), var(--wisteria-accent));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(139, 124, 248, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-secondary {
    background: var(--gray-900);
    color: var(--white);
    width: 100%;
    margin-top: 1.25rem;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-800);
    transform: translateY(-1px);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-text {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary.loading .btn-text {
    opacity: 0;
}

.btn-primary.loading .btn-loading {
    opacity: 1;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scan section */
.scan-section {
    margin-top: 0.75rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    display: none;
    animation: slideIn 0.4s ease;
}

.scan-section.show {
    display: block;
}

.scan-header {
    margin-bottom: 0.75rem;
}

.scan-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.scan-subtitle {
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Scan list */
.scan-list {
    list-style: none;
    margin-bottom: 1rem;
}

.scan-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    color: var(--gray-600);
}

.scan-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid var(--gray-300);
    background: var(--white);
}

.scan-item.active .scan-dot {
    border-color: var(--wisteria-secondary);
    background: var(--wisteria-light);
}

.scan-item.done .scan-dot {
    border-color: var(--success);
    background: var(--success);
}

.scan-item.done .scan-text {
    color: var(--gray-800);
    font-weight: 500;
}

/* Scan progress */
.scan-progress-wrapper {
    margin-bottom: 0.5rem;
}

.scan-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.scan-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--wisteria-primary), var(--wisteria-secondary));
    transition: width 0.25s ease;
}

.scan-percentage {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Status message (reused) */
.status-message {
    font-size: 0.85rem;
    text-align: left;
    margin-top: 0.2rem;
    color: var(--gray-700);
}

.status-message.error {
    color: var(--error);
}

.status-message.success {
    color: var(--success);
}

.status-message.warning {
    color: var(--warning);
}

/* Result section */
.result-section {
    margin-top: 1.5rem;
    display: none;
    animation: slideIn 0.4s ease;
}

.result-section.show {
    display: block;
}

.result-card {
    background: var(--gray-900);
    border-radius: 0.85rem;
    padding: 1.5rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background: radial-gradient(circle at top left, var(--wisteria-primary), transparent 60%),
                radial-gradient(circle at bottom right, var(--wisteria-secondary), transparent 60%);
    pointer-events: none;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(5, 150, 105, 0.15);
    color: #6ee7b7;
    margin-bottom: 0.9rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
    font-size: 0.9rem;
}

.result-label {
    color: var(--gray-300);
}

.result-value {
    font-weight: 600;
}

/* Ad slots */
.ad-slot {
    margin-top: 1rem;
    border-radius: 0.75rem;
    border: 1px dashed var(--gray-300);
    padding: 0.75rem;
    background: var(--gray-50);
}

.ad-slot-primary {
    margin-top: 1.25rem;
}

.ad-slot-result {
    margin-top: 1.25rem;
}

.ad-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray-500);
}

.ad-placeholder {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 0.8rem;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Clipboard button styles */
.clipboard-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}
.btn-clipboard {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}
.btn-clipboard:hover {
    background: var(--gray-200);
}
.btn-clipboard:active {
    transform: translateY(1px);
}
@media (max-width: 480px) {
    .btn-clipboard {
        padding: 8px 12px;
        font-size: 15px;
        border-radius: 10px;
    }
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 0.75rem;
    }
    .title {
        font-size: 2rem;
    }
    .card {
        padding: 1.5rem;
    }
    .steps {
        gap: 0.4rem;
    }
    .step-label {
        font-size: 0.7rem;
    }
    .btn-primary,
    .btn-secondary {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 1.25rem 0.75rem;
        max-width: 100%;
    }
    .title {
        font-size: 1.8rem;
    }
    .subtitle {
        font-size: 0.9rem;
    }
    .card {
        padding: 1.25rem;
        margin: 0;
    }
    .steps {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    .step {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    .step-number {
        flex-shrink: 0;
    }
    .scan-section {
        padding: 1rem;
    }
    .result-card {
        padding: 1.25rem;
    }
    .footer {
        margin-top: 2rem;
        padding-top: 1rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }
    .subtitle {
        font-size: 0.85rem;
    }
    .card {
        padding: 1rem;
        border-radius: 0.75rem;
    }
    .input {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.25rem;
        font-size: 0.85rem;
    }
    .scan-title {
        font-size: 0.95rem;
    }
    .result-title {
        font-size: 0.95rem;
    }
}

/* Desktop Enhancements */
@media (min-width: 769px) {
    .nav-toggle {
        display: none !important;
    }
}


@media (min-width: 769px) {
    .container {
        padding: 3rem 2rem;
    }
    .title {
        font-size: 2.5rem;
    }
    .subtitle {
        font-size: 1.1rem;
    }
    .card {
        padding: 2.5rem;
    }
    .steps {
        gap: 1rem;
    }
    .step-label {
        font-size: 0.8rem;
    }
}
