/* ══════════════════════════════════════════
   Gift Suggester — Tool Styles
   ══════════════════════════════════════════ */

/* ── Navigation (scoped, simplified) ── */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 0 24px;
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.25s;
}

.nav-links a:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

/* ── Layout ── */
.tool-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

/* ── Header ── */
.tool-header {
    text-align: center;
    margin-bottom: 48px;
}

.tool-tag {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.tool-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Input Section ── */
.input-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
}

.input-section label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.input-section textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.25s;
}

.input-section textarea:focus {
    border-color: var(--accent);
}

.input-section textarea::placeholder {
    color: var(--text-muted);
}

/* Options row */
.input-options {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.option-group {
    flex: 1;
    min-width: 160px;
}

.option-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.option-group select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.25s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.option-group select:focus {
    border-color: var(--accent);
}

/* Generate button */
.btn-generate {
    width: 100%;
    margin-top: 20px;
    padding: 14px 28px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-generate [hidden] {
    display: none !important;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Results ── */
.results-section {
    margin-top: 16px;
}

.results-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
}

/* Individual gift card */
.gift-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    transition: border-color 0.3s, transform 0.3s;
    animation: fadeUp 0.4s ease both;
}

.gift-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gift-card:nth-child(1) { animation-delay: 0s; }
.gift-card:nth-child(2) { animation-delay: 0.06s; }
.gift-card:nth-child(3) { animation-delay: 0.12s; }
.gift-card:nth-child(4) { animation-delay: 0.18s; }
.gift-card:nth-child(5) { animation-delay: 0.24s; }
.gift-card:nth-child(6) { animation-delay: 0.30s; }
.gift-card:nth-child(7) { animation-delay: 0.36s; }
.gift-card:nth-child(8) { animation-delay: 0.42s; }
.gift-card:nth-child(9) { animation-delay: 0.48s; }
.gift-card:nth-child(10) { animation-delay: 0.54s; }

.gift-card-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.gift-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 170, 0.15);
    flex-shrink: 0;
}

.gift-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.gift-reason {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.gift-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gift-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 4px;
}

.gift-tag.price {
    background: rgba(0, 136, 255, 0.1);
    color: #5cb8ff;
}

.gift-tag.category {
    background: rgba(212, 170, 0, 0.1);
    color: #d4aa00;
}

/* ── Error Banner ── */
.error-banner {
    background: rgba(255, 60, 60, 0.1);
    border: 1px solid rgba(255, 60, 60, 0.3);
    color: #ff6b6b;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 0.9rem;
    margin-top: 16px;
    line-height: 1.5;
}

/* ── Footer ── */
footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.3rem;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 8px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
    }
}

@media (max-width: 600px) {
    .tool-container {
        padding: 100px 16px 60px;
    }

    .input-options {
        flex-direction: column;
    }

    .gift-card {
        padding: 18px;
    }
}
