:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --card-bg: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: 600;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

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

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

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-inline: auto;
}

.hero p {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-inline: auto;
}

/* Grid layout */
.features {
    padding: 1rem 5% 4rem 5%;
    text-align: center;
}

.pricing {
    padding: 1rem 5% 4rem 5%;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.credit-rates-strip {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 auto 3rem auto;
    max-width: 1000px;
}

.rate-badge {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    padding: 0.5rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rate-badge strong {
    color: white;
}

/* Pricing */
.pricing-table {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.plan {
    background-color: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 12px;
    min-width: 300px;
    max-width: 350px;
    flex: 1;
    position: relative;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
}

.plan.pro {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.plan .badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #fbbf24;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.plan .plan-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    min-height: 45px;
}

.plan .price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 1rem 0;
}

.plan .price span {
    font-size: 1rem;
    color: #94a3b8;
}

.plan ul {
    list-style: none;
    text-align: center;
    margin-bottom: 2rem;
}

.plan ul li {
    margin-bottom: 0.5rem;
}

.plan button {
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }
    
    .nav-links a { 
        display: none; 
    }
    
    .hero {
        padding: 4rem 1rem;
    }

    .hero h1 { 
        font-size: 2rem; 
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .plan {
        min-width: 100%;
        padding: 2rem 1.5rem;
    }

    .plan.pro { 
        transform: none; 
        margin-top: 1rem;
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
    
    .toast {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
}

.close-btn:hover {
    color: white;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #334155;
    background-color: #0f172a;
    color: white;
}

.modal-content button {
    width: 100%;
    margin-top: 1rem;
}

.modal-content button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-toggle {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    color: #cbd5e1;
}

.auth-toggle a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

.account-details {
    background-color: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: left;
}

.account-details p {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

.credit-box {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #334155;
    text-align: center;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--card-bg);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
    border-left: 4px solid var(--primary);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}
