/* DeckBanker – main stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-bg:       #0f0f13;
    --color-surface:  #1a1a24;
    --color-surface2: #252532;
    --color-accent:   #f5c518;
    --color-accent-hover: #ffd54f;
    --color-text:     #e8e8e8;
    --color-muted:    #888;
    --color-error:    #ff5252;
    --color-success:  #4caf50;
    --radius:         8px;
    --radius-lg:      16px;
    --max-width:      1100px;
    --transition:     0.2s ease;
}

html { scroll-behavior: smooth; }

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ===== NAVIGATION ===== */
header {
    background: rgba(15, 15, 19, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #2a2a36;
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span { color: var(--color-text); }

nav ul { list-style: none; display: flex; gap: 2rem; align-items: center; }
nav ul a { color: var(--color-text); font-weight: 500; }
nav ul a:hover { color: var(--color-accent); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-accent);
    color: #000;
}
.btn-primary:hover {
    background: var(--color-accent-hover);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(245, 197, 24, 0.3);
}

.btn-secondary {
    background: var(--color-surface2);
    color: var(--color-text);
    border: 1px solid #3a3a4a;
}
.btn-secondary:hover {
    background: #32323f;
    color: var(--color-text);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero h1 .accent { color: var(--color-accent); }

.hero p {
    font-size: 1.25rem;
    color: var(--color-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== FEATURES ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 3rem 0;
}

.feature-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid #2a2a36;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--color-muted);
    font-size: 0.95rem;
}

/* ===== PRICING ===== */
.pricing-section {
    padding: 4rem 0;
    text-align: center;
}

.pricing-section h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.pricing-section > p {
    color: var(--color-muted);
    margin-bottom: 3rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 2px solid #2a2a36;
    position: relative;
    transition: all var(--transition);
}

.pricing-card.featured {
    border-color: var(--color-accent);
}

.pricing-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #000;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 800;
    margin: 1rem 0;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-muted);
}

.pricing-card ul {
    list-style: none;
    text-align: left;
    margin: 1.5rem 0;
}

.pricing-card li {
    padding: 0.5rem 0;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-card li::before {
    content: '✓';
    color: var(--color-success);
    font-weight: bold;
}

.pricing-card li.disabled {
    text-decoration: line-through;
    opacity: 0.5;
}

.pricing-card li.disabled::before {
    content: '✗';
    color: var(--color-error);
}

.pricing-card .btn {
    width: 100%;
    margin-top: 1rem;
}

/* ===== AUTH FORMS ===== */
.auth-container {
    max-width: 420px;
    margin: 2rem auto;
}

.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid #2a2a36;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card > p {
    text-align: center;
    color: var(--color-muted);
    margin-bottom: 2rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition);
    border: none;
    background: transparent;
    color: var(--color-muted);
}

.auth-tab.active {
    background: var(--color-accent);
    color: #000;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    border: 1px solid #3a3a4a;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
}

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

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-error {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid var(--color-error);
    color: var(--color-error);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.auth-error.show { display: block; }

/* ===== ANALYZER ===== */
.analyzer-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.analyzer-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.analyzer-header p {
    color: var(--color-muted);
}

.search-box {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid #2a2a36;
    margin-bottom: 2rem;
}

.search-input-group {
    display: flex;
    gap: 1rem;
}

.search-input-group input {
    flex: 1;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid #3a3a4a;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1rem;
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.results-box {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid #2a2a36;
    min-height: 300px;
    display: none;
}

.results-box.show { display: block; }

.results-box h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #2a2a36;
}

.result-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.result-section h3 {
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-section p {
    color: var(--color-text);
    line-height: 1.7;
}

.investment-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.1rem;
}

.rating-bullish { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.rating-neutral { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.rating-bearish { background: rgba(255, 82, 82, 0.2); color: #ff5252; }

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--color-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-surface2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* ===== PAYWALL ===== */
.paywall-overlay {
    text-align: center;
    padding: 3rem;
}

.paywall-overlay h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.paywall-overlay p {
    color: var(--color-muted);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== USER INFO ===== */
.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.plan-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.plan-badge.free { background: #3a3a4a; color: var(--color-muted); }
.plan-badge.pro { background: var(--color-accent); color: #000; }

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--color-muted);
    font-size: 0.875rem;
    border-top: 1px solid #2a2a36;
    margin-top: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero { padding: 2rem 0; }

    .search-input-group {
        flex-direction: column;
    }

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

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.alert-error {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}
