/* ==========================================================================
   1. Base Styles & Custom Properties
   ========================================================================== */
:root {
    --color-primary: #3b82f6;
    --color-primary-dark: #1e40af;
    --color-secondary: #facc15;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-bg: #f8fafc;
    --color-bg-alt: #ffffff;
    --color-border: #e2e8f0;
    --color-white: #ffffff;
    --color-success: #16a34a;
    --color-error: #dc2626;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .section {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 2.5rem;
    color: var(--color-text);
}

.section__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.gradient-text {
    background: linear-gradient(to right, var(--color-primary), var(--color-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-white {
    background-color: var(--color-bg-alt);
}


/* ==========================================================================
   2. Header
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(1rem);
    border-bottom: 1px solid var(--color-border);
}

.header__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.header__logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--color-text);
}
.header__logo .text-primary {
    color: var(--color-primary);
}

.header__menu {
    display: none;
    align-items: center;
    gap: 2rem;
}
@media (min-width: 768px) { .header__menu { display: flex; } }

.header__link {
    text-decoration: none;
    color: var(--color-text-muted);
    transition: color 0.2s ease-in-out;
}
.header__link:hover {
    color: var(--color-primary);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-name {
    font-weight: 600;
    color: var(--color-text);
}

.btn-logout {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}
.btn-logout:hover {
    color: var(--color-error);
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
    background-color: #1d4ed8;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn--secondary {
    background-color: var(--color-bg-alt);
    color: var(--color-text-muted);
    border-color: var(--color-border);
}
.btn--secondary:hover {
    background-color: #f1f5f9;
    color: var(--color-text);
}

.btn--outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn--outline:hover {
    background-color: #eff6ff;
}

.btn--light {
    background-color: var(--color-white);
    color: var(--color-primary);
}
.btn--light:hover {
    background-color: #e0f2fe;
}

.btn--premium {
    background-color: var(--color-secondary);
    color: #422006;
    font-weight: 700;
}
.btn--premium:hover {
    background-color: #f59e0b;
    transform: translateY(-2px);
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    box-shadow: var(--shadow-lg);
}
.btn-link {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    text-decoration: underline;
}
.btn-link:hover {
    color: var(--color-text);
}


/* ==========================================================================
   4. Hero Section
   ========================================================================== */
.hero {
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.hero__content {
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text);
}
@media (min-width: 768px) { .hero__title { font-size: 3.75rem; } }

.hero__subtitle {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.hero__cta {
    margin-top: 2.5rem;
}

.hero__cta-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.hero__image-wrapper {
    margin-top: 5rem;
}

.hero__image {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
}
.glow-shadow {
  box-shadow: 0 10px 50px -10px rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
   5. Features Section
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
    background-color: var(--color-bg);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease-in-out;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    width: 3rem;
    border-radius: 9999px;
    background-color: #dbeafe;
    color: var(--color-primary);
}
.feature-card__icon svg {
    height: 1.5rem;
    width: 1.5rem;
}

.feature-card__title {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.feature-card__description {
    margin-top: 0.5rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   6. Pricing Section
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 768px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }

.pricing-card {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.pricing-card--featured {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: scale(1.0);
}
@media (min-width: 768px) { .pricing-card--featured { transform: scale(1.05); } }

.pricing-card__content {
    flex-grow: 1;
}

.pricing-card__title {
    font-size: 1.5rem;
    font-weight: 700;
}
.pricing-card--featured .pricing-card__title {
    color: var(--color-white);
}

.pricing-card__description {
    margin-top: 0.5rem;
    color: var(--color-text-muted);
}
.pricing-card--featured .pricing-card__description {
    color: #93c5fd;
}

.pricing-card__price {
    margin-top: 1.5rem;
    font-size: 2.25rem;
    font-weight: 800;
}
.pricing-card--featured .pricing-card__price {
    color: var(--color-white);
}

.pricing-card__price-period {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-muted);
}
.pricing-card--featured .pricing-card__price-period {
    color: #93c5fd;
}

.pricing-card__features {
    list-style: none;
    margin-top: 2rem;
    margin-bottom: 2rem; /* <-- EDITED: Added margin-bottom for spacing */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.pricing-card__features li {
    display: flex;
    align-items: center;
}
.pricing-card__features svg {
    height: 1.25rem;
    width: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    color: var(--color-success);
}
.pricing-card--featured .pricing-card__features svg {
    color: var(--color-white);
}
.pricing-card__features .feature--disabled {
    color: var(--color-text-muted);
}
.pricing-card__features .feature--disabled svg {
    color: #ef4444;
}
.pricing-card__features .feature--disabled span {
    text-decoration: line-through;
}


/* ==========================================================================
   7. Modals
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
    transition: opacity 0.3s ease-in-out;
}
.modal-overlay.hidden { display: none; }

.modal-content {
    background-color: var(--color-white);
    padding: 2rem 2.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 28rem;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.modal-overlay:not(.opacity-0) .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}
.modal-subtitle {
    margin-top: 0.5rem;
    color: var(--color-text-muted);
}
.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}
.modal-close-btn:hover {
    color: var(--color-text);
}

.modal-form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-divider {
    text-align: center;
    font-weight: 600;
    color: var(--color-text);
    padding-top: 1rem;
}
.form-message {
    text-align: center;
    font-size: 0.875rem;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
}


/* ==========================================================================
   8. Footer
   ========================================================================== */
.footer {
    background-color: var(--color-text);
    color: #d1d5db;
}
.footer__content {
    padding: 4rem 1.5rem;
    text-align: center;
}
.footer__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
}
.footer__text {
    margin-top: 1rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    color: #9ca3af;
}
.footer__link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 1.125rem;
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer__link:hover {
    color: #93c5fd;
}
.footer__copyright {
    margin-top: 2.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}
.footer__credits {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #4b5563;
}

.w-full {
    width: 100%;
}
.mt-auto {
    margin-top: auto;
}
