@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

/* -------------------------------------------------------------------------- */
/* 1. CONFIGURATION & VARIABLES                                               */
/* -------------------------------------------------------------------------- */

:root {
    /* Colors */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-rgb: 99, 102, 241;
    --accent: #f43f5e;
    --accent-rgb: 244, 63, 94;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-input: rgba(15, 23, 42, 0.5);

    /* Text */
    --text-main: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);

    /* Effects */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-base: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);

    /* Borders */
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

/* -------------------------------------------------------------------------- */
/* 2. RESET & BASE STYLES                                                    */
/* -------------------------------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    overflow-wrap: break-word;
    /* Prevents long words from breaking layout */
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(var(--primary-rgb), 0.15) 0%, transparent 25%),
        radial-gradient(circle at 80% 80%, rgba(var(--accent-rgb), 0.1) 0%, transparent 25%);
    min-height: 100vh;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

main {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* 3. UTILITIES                                                              */
/* -------------------------------------------------------------------------- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hidden-btn {
    display: none !important;
}

.full-width {
    width: 100% !important;
}

.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.d-flex {
    display: flex !important;
}

.flex-column {
    flex-direction: column !important;
}

.align-center {
    align-items: center !important;
}

.justify-center {
    justify-content: center !important;
}

.justify-between {
    justify-content: space-between !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.gap-05 {
    gap: 0.5rem !important;
}

.gap-1 {
    gap: 1rem !important;
}

.gap-15 {
    gap: 1.5rem !important;
}

.mt-1 {
    margin-top: 1rem !important;
}

.mt-2 {
    margin-top: 2rem !important;
}

.mb-05 {
    margin-bottom: 0.5rem !important;
}

.mb-1 {
    margin-bottom: 1rem !important;
}

.mb-15 {
    margin-bottom: 1.5rem !important;
}

.mb-2 {
    margin-bottom: 2rem !important;
}

.mt-4 {
    margin-top: 4rem !important;
}

.mb-4 {
    margin-bottom: 4rem !important;
}

.p-2 {
    padding: 2rem !important;
}

.fs-sm {
    font-size: 0.85rem !important;
}

.pb-mobile-lg {
    padding-bottom: 2rem !important;
}

@media (max-width: 768px) {
    .pb-mobile-lg {
        padding-bottom: 6rem !important;
    }
}

.opacity-0 {
    opacity: 0 !important;
}

.list-.no-decor {
    text-decoration: none !important;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.gallery-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-item:hover .gallery-item-img {
    transform: scale(1.1);
}

.list-none {
    list-style: none !important;
}

.m-0 {
    margin: 0 !important;
}

.min-w-250 {
    min-width: 250px !important;
}

.fs-15 {
    font-size: 1.5rem !important;
}

.ml-10 {
    margin-left: 10px !important;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-accent {
    color: var(--accent) !important;
}

.bg-primary {
    background: var(--primary) !important;
}

.text-danger {
    color: #ef4444 !important;
}

.bg-danger {
    background: #ef4444 !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.d-inline-block {
    display: inline-block !important;
}

.w-100 {
    width: 100% !important;
}

.p-0 {
    padding: 0 !important;
}

.cursor-default {
    cursor: default !important;
}

.opacity-7 {
    opacity: 0.7 !important;
}

.section-card {
    padding: 2rem;
    border-radius: 20px;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

.section-card {
    padding: 2rem;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden-btn {
    display: none !important;
}

/* -------------------------------------------------------------------------- */
/* 4. TYPOGRAPHY                                                             */
/* -------------------------------------------------------------------------- */

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    line-height: 1.1;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    font-weight: 700;
}

.logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

/* -------------------------------------------------------------------------- */
/* 5. NAVIGATION                                                             */
/* -------------------------------------------------------------------------- */

.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    width: 100%;
}

.user-greeting {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

@media (max-width: 600px) {
    .user-greeting {
        max-width: 200px;
    }
}

.user-greeting strong {
    color: var(--primary);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 5%;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 600px) {
    nav {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .main-header {
        position: relative;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        height: 40px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .btn-auth {
        flex: 1;
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* User Menu & Dropdown Styles */
.user-menu-trigger {
    padding: 0.5rem 1rem !important;
}

.user-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-avatar-fallback {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.user-greeting {
    margin-left: 0.5rem;
}

.user-arrow {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-left: 4px;
}

.dropdown-header-info {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-user-name {
    font-weight: bold;
}

/* -------------------------------------------------------------------------- */
/* 6. BUTTONS                                                                */
/* -------------------------------------------------------------------------- */

.btn-auth {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    color: #ffffff !important;
    /* Contraste máximo */
}

.btn-auth.glass {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-auth.glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

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

.generate-main-btn {
    min-width: 250px;
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 1rem;
    justify-content: center;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1rem;
    align-items: center;
}

.btn-stop {
    display: none;
    color: var(--accent) !important;
    border: 1px solid var(--accent) !important;
    min-width: 250px;
    width: auto;
    background: transparent;
}

.btn-stop:hover {
    background: rgba(var(--accent-rgb), 0.1);
    transform: translateY(-2px);
}

.field-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.2rem;
}

.btn-text-action {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-base);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.btn-text-action:hover {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}

.btn-clear {
    color: var(--accent);
    border-color: var(--accent);
    padding: 0.5rem 1rem;
}

.download-area {
    margin-top: 1.5rem;
    width: 100%;
}

/* -------------------------------------------------------------------------- */
/* 7. FORM ELEMENTS                                                          */
/* -------------------------------------------------------------------------- */

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

.label-with-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.line-counter {
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}

textarea,
input,
select {
    width: 100%;
    padding: 1rem;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    transition: var(--transition-base);
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

textarea {
    resize: none;
}

#prompts,
#filenames {
    height: 120px;
}

#custom_style {
    height: 180px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbars */
textarea::-webkit-scrollbar,
.image-grid::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track,
.image-grid::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb,
.image-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
    border: 2px solid rgba(15, 23, 42, 0.5);
}

textarea::-webkit-scrollbar-thumb:hover,
.image-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* -------------------------------------------------------------------------- */
/* 8. RESULTS & IMAGE GRID                                                   */
/* -------------------------------------------------------------------------- */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-left h2 {
    line-height: 1.2 !important;
    margin: 0 !important;
    font-size: 1.5rem;
}

.counter-badge {
    background: var(--primary);
    padding: 3px 10px 4px 10px;
    /* Slightly more bottom padding for optical vertical centering of numbers */
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: auto;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

/* Shared grid layout for both areas */
.image-grid,
.dashboard-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 0;
}

/* Specific to Generator (keeps scrollbar) */
.image-grid {
    max-height: 800px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

/* Responsive (Both) */
@media (max-width: 600px) {

    .image-grid,
    .dashboard-image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0;
    }
}

/* Image Card Component */
.image-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    transition: var(--transition-base);
    background: var(--bg-card);
    aspect-ratio: 1;
    /* Match dashboard square style */
    display: block;
    animation: fadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.img-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, filter 0.6s ease;
    opacity: 0;
    filter: blur(15px);
    transform: scale(1.1);
}

.img-wrapper img.loaded {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

.image-card:hover .img-wrapper img.loaded {
    transform: scale(1.1);
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: var(--transition-base);
    pointer-events: none;
    z-index: 5;
}

.image-card:hover .card-info {
    opacity: 1;
}

.image-name-tag {
    font-size: 0.75rem;
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-prompt-tag {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* Download Action Button */
.btn-download-single {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-5px);
    transition: var(--transition-base);
    z-index: 10;
}

.image-card:hover .btn-download-single {
    opacity: 1;
    transform: translateY(0);
}

.btn-download-single:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.btn-download-single svg {
    width: 16px;
    height: 16px;
}

/* Status overlays */
.image-card .status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.9);
    padding: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
    backdrop-filter: blur(4px);
}

.status-error {
    background: rgba(var(--accent-rgb), 0.9);
}

.status-error-border {
    border-color: var(--accent) !important;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    grid-column: 1/-1;
    padding: 5rem 0;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    text-align: center;
}

.cta-container {
    padding: 4rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.cta-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* -------------------------------------------------------------------------- */
/* 9. PROGRESS & FEEDBACK                                                    */
/* -------------------------------------------------------------------------- */

.progress-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    height: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg,
            var(--primary) 0%,
            var(--accent) 30%,
            rgba(255, 255, 255, 0.5) 50%,
            var(--accent) 70%,
            var(--primary) 100%);
    background-size: 200% 100%;
    animation: progress-shimmer 2s infinite linear;
    transition: width 0.3s ease;
}

@keyframes progress-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.placeholder-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1rem;
    text-align: center;
}

.placeholder-name {
    font-size: 0.8rem;
    margin-top: 12px;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------------- */
/* 10. ANIMATIONS                                                            */
/* -------------------------------------------------------------------------- */

.spinner {
    width: 35px;
    height: 35px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.animate-fade {
    animation: fadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* -------------------------------------------------------------------------- */
/* 11. FOOTER                                                                */
/* -------------------------------------------------------------------------- */

.footer {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-left p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-right {
    display: flex;
    gap: 2rem;
}

.footer-right a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.footer-right a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-right {
        justify-content: center;
        gap: 1rem;
    }
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

/* -------------------------------------------------------------------------- */
/* 10. NEW PAGES STYLES (LANDING, PRICING, LEGAL)                            */
/* -------------------------------------------------------------------------- */

/* Hero Section */
.hero-section {
    padding: 6rem 0;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

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

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-image .image-container {
    padding: 0.5rem;
    border-radius: var(--radius-lg);
}

.rounded-image {
    width: 100%;
    border-radius: calc(var(--radius-lg) - 0.5rem);
    display: block;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.feature-card {
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 41, 59, 0.7);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* Pricing Section */
.pricing-section {
    padding-bottom: 5rem;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    row-gap: 4rem;
    /* Specific vertical spacing for wrapped cards */
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pricing-card {
    padding: 2.5rem 1.5rem;
    /* Reduced horizontal padding for mobile */
    width: 100%;
    max-width: 320px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    transform: scale(1.05);
    z-index: 2;
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.price-dual {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1.5rem 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.price-dual span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.price-billing {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: center;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
}

/* Contact / Support */
.contact-card {
    max-width: 600px;
    margin: 4rem auto;
}

.contact-form {
    margin-top: 2rem;
}

.full-width {
    width: 100%;
}

/* -------------------------------------------------------------------------- */
/* PROFILE EDIT STYLES                                                       */
/* -------------------------------------------------------------------------- */

.profile-info h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
}

.edit-btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-base);
    opacity: 0.5;
    padding: 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.edit-btn-icon:hover {
    opacity: 1;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.name-edit-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    animation: authFadeIn 0.3s ease;
}

.edit-input-field {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    padding: 8px 12px !important;
    max-width: 350px;
    min-width: 200px;
    background: rgba(var(--primary-rgb), 0.05) !important;
    border: 1px solid var(--primary) !important;
    color: var(--text-main) !important;
    border-radius: var(--radius-md);
    outline: none;
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.2);
}

.edit-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 1.2rem;
}

.btn-icon-action.save {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.btn-icon-action.save:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    transform: scale(1.05);
}

.btn-icon-action.cancel {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-icon-action.cancel:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: scale(1.05);
}

.d-none {
    display: none !important;
}

.subscription-status {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.subscription-status p {
    color: #4ade80;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.success-glass {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.payment-box {
    margin-top: 2rem;
    border: 1px solid var(--primary);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.payment-box .payment-label {
    margin-bottom: 1rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

.mt-2 {
    margin-top: 2rem !important;
}

/* Legal Pages */
.legal-page {
    max-width: 800px;
    padding: 4rem 0;
}

.legal-page h1 {
    margin-bottom: 0.5rem;
}

.last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal-page h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Error Page */
.error-page-container {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-code {
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
}

/* Responsive Adjustments for new pages */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .pricing-card.popular {
        transform: scale(1);
        margin-top: 1rem;
    }
}

@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }
}

/* Auth Pages */
.auth-page-main {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    max-width: 450px !important;
    width: 100%;
    margin: 2rem auto;
    text-align: center;
}

.auth-error-alert,
.auth-success-alert,
.auth-warning-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    text-align: left;
}

.auth-error-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.auth-success-alert {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.auth-warning-alert {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.btn-google,
.btn-microsoft {
    background: white !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    justify-content: center;
    gap: 12px;
    padding: 0.8rem !important;
    font-size: 1rem !important;
}

.btn-google:hover,
.btn-microsoft:hover {
    background: #f8fafc !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-footer {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* User Dropdown Menu */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding-right: 1rem !important;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 220px;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 12px;
    z-index: 1000;
    flex-direction: column;
    gap: 0.25rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.user-dropdown-menu.show {
    display: flex;
    animation: fadeIn 0.15s ease-out;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.25rem 0;
}

.dropdown-item.text-danger {
    color: #ef4444;
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* -------------------------------------------------------------------------- */
/* 12. DASHBOARD SPECIFIC                                                    */
/* -------------------------------------------------------------------------- */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dash-card {
    padding: 2.5rem 1.5rem;
    /* Reduced padding for mobile */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    border-radius: 20px;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    min-height: 420px;
    height: 100%;
}

.card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
}

.card-footer {
    width: 100%;
    margin-top: 2rem;
}

.dash-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin: 0.2rem 0 0.5rem 0;
    /* Tiny top margin to match h3 titles better */
    filter: drop-shadow(0 2px 10px rgba(var(--primary-rgb), 0.3));
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-muted);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-info h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.profile-info p {
    color: var(--text-secondary);
    word-break: break-all;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .profile-info {
        width: 100%;
        align-items: center;
    }

    .profile-info h1 {
        font-size: 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .profile-info p {
        font-size: 0.8rem !important;
        opacity: 0.8;
        max-width: 100%;
    }

    .dashboard-grid {
        gap: 1rem;
    }

    .container {
        padding: 0 1rem;
        gap: 1rem;
    }

    .profile-section,
    .gallery-section {
        padding: 1.5rem 1rem !important;
    }
}

.profile-section,
.gallery-section {
    padding: 2rem;
    border-radius: 20px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.badge-pro {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.section-card {
    padding: 2rem;
    border-radius: 20px;
}

.alert-warning {
    text-align: center;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    color: #fbbf24;
}

.alert-danger {
    padding: 1rem;
    text-align: center;
    border: 1px solid #ef4444;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.card-title {
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.progress-small {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.progress-small-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
    width: var(--progress, 0%);
}

.hidden {
    display: none !important;
}

.delay-02 {
    animation-delay: 0.2s !important;
}

.not-allowed {
    cursor: not-allowed !important;
}

.p-0 {
    padding: 0 !important;
}

.badge-base {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-free {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.no-decor {
    text-decoration: none !important;
}

/* Premium Spinner */
.spinner-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    width: 100%;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

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

/* Discrete Cancel Link */
.cancel-link-container {
    text-align: right;
    width: 100%;
    margin: 0.25rem 0;
    display: block;
}

.cancel-link {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 0.75rem;
    opacity: 0.6;
    padding: 0;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-base);
}

.cancel-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* 11. BILLING PAGE STYLES                                                    */
/* -------------------------------------------------------------------------- */

.billing-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.card-management {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.payment-method-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.card-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.btn-danger {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent) !important;
    border: 1px solid var(--accent);
}

.btn-danger:hover {
    background: var(--accent);
    color: white !important;
}

/* New Card Form Styles */
#add-card-section {
    display: none;
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-md);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.form-control {
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    padding: 0.8rem;
    color: white;
    border-radius: 8px;
    width: 100%;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .payment-method-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .payment-method-card .btn-danger {
        width: 100%;
    }

}

@media (max-width: 400px) {

    .pricing-card,
    .dash-card {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .btn-auth {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* --- Billing Page Styles --- */
.billing-header {
    margin-bottom: 2rem;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 1rem;
}

.billing-section {
    padding: 2.5rem;
    border-radius: 20px;
}

.billing-section-title {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.form-field-group {
    margin-bottom: 1rem;
}

.form-label-small {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-actions-row {
    display: flex;
    gap: 1rem;
}

.btn-flex {
    flex: 1;
}

.form-footer-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

/* Controller-driven components */
.card-brand-name {
    font-weight: 600;
}

.card-usage-tip {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-removal-note {
    background: rgba(var(--primary-rgb), 0.1);
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    margin-top: 1rem;
}

.card-removal-note p {
    font-size: 0.9rem;
}

.replace-card-section {
    margin-top: 2rem;
    text-align: center;
}

.replace-card-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.billing-empty-state {
    text-align: center;
    padding: 2rem;
}

.billing-empty-state .empty-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.billing-empty-state .footer-tip {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cancel-subscription-row {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* --- Custom Modal System --- */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

.custom-modal.active {
    display: flex;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal.active .modal-overlay {
    opacity: 1;
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    z-index: 10001;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
}

.close-modal {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.close-modal:hover {
    background: var(--accent);
    color: white;
    transform: rotate(90deg);
}

/* Authentication Page Helpers */
.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-divider {
    margin: 1.5rem 0;
    width: 100%;
    position: relative;
    text-align: center;
}

.auth-divider-span {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.btn-google {
    background: white !important;
    color: #1f2937 !important;
    margin-bottom: 0.5rem;
}

.btn-google img {
    margin-right: 10px;
}

.auth-input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
}

.auth-error-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.auth-card .form-group {
    text-align: left;
}

.auth-card label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.label-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.label-group label {
    margin-bottom: 0 !important;
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-base);
    opacity: 0.8;
}

.forgot-link:hover {
    opacity: 1;
    text-decoration: underline;
    transform: translateX(-2px);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-footer-disclaimer {
    margin-top: 1rem;
    opacity: 0.7;
    font-size: 0.85rem;
}

/* Pricing Helpers */
.best-value-badge {
    background: var(--primary) !important;
}

.mt-05 {
    margin-top: 0.5rem !important;
}

.mt-1 {
    margin-top: 1rem !important;
}


.extra-badge {
    background: var(--accent) !important;
}

.modal-body {
    padding: 25px;
    text-align: center;
}

.modal-body-left {
    text-align: left !important;
}

.h-150 {
    height: 150px !important;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 20px;
}

.policy-badge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    text-align: left;
}

.policy-badge .icon {
    font-size: 1.1rem;
}

.policy-badge span {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.modal-footer {
    padding: 20px 25px;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn-auth {
    flex: 1;
    margin: 0;
}

.h-150 {
    height: 150px !important;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.grid-full-width {
    grid-column: 1 / -1;
    width: 100%;
}

@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* --- Toast System --- */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    pointer-events: all;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-width: 350px;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid var(--accent);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

.toast.fade-out {
    animation: toastOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }
}

.toast-icon {
    font-size: 1.25rem;
}

/* Confirm Modal Specifics */
.modal-body.text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem !important;
}

.mb-15 {
    margin-bottom: 1.5rem;
}

/* Billing Summary */
.subscription-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-item .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.summary-item .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Billing & Card Management */
.payment-method-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.payment-method-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.payment-method-card.default-card {
    border-color: var(--primary);
    background: rgba(109, 40, 217, 0.05);
}

.card-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 2rem;
}

.card-icon {
    font-size: 1.5rem;
    background: var(--glass-bg);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.card-brand-name {
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
}

.card-usage-tip {
    font-size: 0.8rem;
    margin: 0.2rem 0 0 0;
    opacity: 0.7;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.success-text {
    color: #10b981 !important;
    opacity: 1 !important;
}

.text-accent {
    color: var(--accent) !important;
}

.justify-between {
    justify-content: space-between !important;
}

.mb-2 {
    margin-bottom: 2rem;
}

.full-width {
    width: 100%;
}