/* Imported from examprayag_next/src/app/globals.css (Dark Mode Default) */
:root {
    /* High Readability Slate Theme (Dark) */
    --bg-page: #0f172a;
    /* Deep Slate Blue */
    --bg-card: #1e293b;
    /* Slate-800 */
    --bg-surface: #334155;
    /* Slate-700 */
    --bg-glass: rgba(255, 255, 255, 0.05);

    --text-primary: #f8fafc;
    /* Off-white for reduced glare */
    --text-secondary: #cbd5e1;
    /* Slate-300 */
    --text-muted: #94a3b8;
    /* Slate-400 */

    --border-color: rgba(255, 255, 255, 0.1);

    --accent: #3b82f6;
    --accent-rgb: 59, 130, 246;

    /* GEP Authority Tokens */
    --gep-success: #10b981;
    --gep-warning: #f59e0b;
    --gep-error: #ef4444;
    --gep-authority: #3b82f6;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --line-height-study: 1.625;
}

[data-theme="light"] {
    /* High Readability Slate Theme (Light) */
    --bg-page: #f8fafc;
    /* Soft Slate-50 */
    --bg-card: #ffffff;
    --bg-surface: #f1f5f9;
    /* Slate-100 */
    --bg-glass: rgba(15, 23, 42, 0.03);

    --text-primary: #0f172a;
    /* Deep Slate for maximum contrast */
    --text-secondary: #475569;
    /* Slate-600 */
    --text-muted: #64748b;
    /* Slate-500 */

    --border-color: rgba(15, 23, 42, 0.1);

    /* GEP Light Mode Adjustments */
    --gep-success: #059669;
    --gep-warning: #d97706;
}

/* Base Styles */
body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: var(--line-height-study);
    letter-spacing: -0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Utility Components matching Next.js App */

.gradient-text {
    background: linear-gradient(to right, #3b82f6, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Examprayag Signature UI - 100% Unique Identity */
.signature-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.signature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--accent-rgb), 0.1);
}

/* Asymmetric "Focus" Cut */
.signature-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    /* Unique diagonal cut */
    background: var(--bg-page);
}

/* "Ignition" Progress Strip (Vertical) */
.ignition-strip {
    position: absolute;
    right: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.ignition-progress {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transition: height 1s ease-out;
}

/* Holographic Metadata Strip */
.holographic-metadata {
    position: absolute;
    bottom: 20px;
    left: 10px;
    padding: 6px 14px;
    background: rgba(var(--bg-card-rgb, 0, 0, 0), 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.signature-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.signature-price-tag {
    background: var(--bg-page);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-weight: 800;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.bg-glass {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(10px);
}

.border-theme {
    border: 1px solid var(--border-color) !important;
}

/* Tailwind-mimic Utilities (Theme-Aware) */
.bg-zinc-950 {
    background-color: var(--bg-page) !important;
}

.bg-zinc-900 {
    background-color: var(--bg-card) !important;
}

.bg-zinc-800 {
    background-color: var(--bg-card) !important;
    filter: brightness(1.1);
}

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

.text-zinc-300,
.text-zinc-400,
.text-zinc-500 {
    color: var(--text-secondary) !important;
}

.border-white-5,
.border-white-10 {
    border-color: var(--border-color) !important;
}

.hover-bg-white-5:hover {
    background-color: var(--bg-glass) !important;
}

.hover-border-accent:hover {
    border-color: rgba(59, 130, 246, 0.5) !important;
}

/* Radius */
.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

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

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

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

.bg-accent-10 {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

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

.badge-pill {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(var(--accent-rgb), 0.05), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(147, 51, 234, 0.05), transparent 40%);
    z-index: -1;
}

[data-theme="light"] .hero-gradient-bg {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(var(--accent-rgb), 0.03), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(147, 51, 234, 0.03), transparent 40%);
}

.hero-gradient-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.2;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.uppercase {
    text-transform: uppercase;
}

/* Buttons */
.btn-primary {
    background-color: var(--accent);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary:hover,
.btn-primary:focus {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    background-color: #2563eb;
    /* blue-600 */
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--foreground);
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
    color: white;
}

.btn-success {
    background-color: #10b981;
    border: none;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    color: white;
}

/* Feature Grid */
.feature-card-hover:hover {
    border-color: rgba(37, 99, 235, 0.5);
    /* accent/50 */
    background-color: rgba(37, 99, 235, 0.05);
}

/* Dashboard Specifics */
.trend-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background-color: rgba(16, 185, 129, 0.1);
    /* emerald-500/10 */
    color: #10b981;
    /* emerald-500 */
    font-size: 0.75rem;
    font-weight: 700;
}

.icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    /* rounded-xl */
    background-color: rgba(59, 130, 246, 0.1);
    /* accent/10 */
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-gradient-blue-purple {
    background: linear-gradient(to bottom right, #2563eb, #9333ea);
    /* blue-600 to purple-600 */
    color: white;
}

/* Admin Colors (Dark Mode Adapted) */
.bg-blue-soft {
    background-color: rgba(59, 130, 246, 0.1);
}

.text-blue-400 {
    color: #60a5fa !important;
}

.bg-emerald-soft {
    background-color: rgba(52, 211, 153, 0.1);
}

.text-emerald-400 {
    color: #34d399 !important;
}

.text-emerald-500 {
    color: #10b981 !important;
}

.bg-purple-soft {
    background-color: rgba(167, 139, 250, 0.1);
}

.text-purple-400 {
    color: #a78bfa !important;
}

.bg-amber-soft {
    background-color: rgba(251, 191, 36, 0.1);
}

.text-amber-400 {
    color: #fbbf24 !important;
}

.text-amber-500 {
    color: #f59e0b !important;
}

.bg-amber-alert {
    background-color: rgba(251, 191, 36, 0.05);
}

.border-amber-alert {
    border-color: rgba(251, 191, 36, 0.1);
}


/* Form Inputs (Theme-Aware) */
.form-control,
.form-select,
.input-group-text {
    background-color: var(--bg-glass) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-card) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
    color: var(--text-primary) !important;
    outline: none;
}

.focus-ring-accent:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2) !important;
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.input-group-text {
    border-right: none;
    color: var(--muted);
}

/* Table Overrides for Dark Mode */
.table {
    color: var(--foreground);
    --bs-table-bg: transparent;
    --bs-table-color: var(--foreground);
    --bs-table-border-color: var(--card-border);
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}


/* --- Global Dark Mode Overrides for Bootstrap --- */
.card {
    background-color: var(--card);
    /* #0a0a0a */
    border: 1px solid var(--card-border);
    color: var(--foreground);
}

.bg-white {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.bg-light {
    background-color: var(--bg-glass) !important;
    color: var(--text-primary) !important;
}

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

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

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

.list-group-item {
    background-color: var(--card);
    border-color: var(--card-border);
    color: var(--foreground);
}

.list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--foreground);
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.btn-close {
    filter: var(--btn-close-filter, none);
}

[data-theme="dark"] .btn-close,
:not([data-theme="light"]) .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

.dropdown-item {
    color: var(--foreground);
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Udemy-Style Premium Course Cards & Utilities */
.hover-scale-sm:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.hover-border-accent:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.1);
}

.group:hover .group-hover-scale {
    transform: scale(1.05);
}

.group-hover-scale {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.extra-small {
    font-size: 0.65rem !important;
}

.text-xs {
    font-size: 0.75rem !important;
}

.bg-white-10 {
    background-color: var(--bg-glass) !important;
}

/* Badge specific */
.badge-bestseller {
    background-color: #fde047;
    color: #000;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    border-radius: 4px;
}

.rounded-xl {
    border-radius: 12px !important;
}

/* Hero Components */
.hero-section {
    background-color: var(--bg-hero);
    color: var(--text-hero);
}

.hero-title {
    color: var(--text-hero-title);
}

.hero-subtitle {
    color: var(--text-hero-subtitle);
}

.hero-button {
    background-color: var(--btn-hero-bg);
    color: var(--btn-hero-text);
    border: 1px solid var(--btn-hero-border);
}

.hero-button:hover {
    background-color: var(--btn-hero-hover-bg);
    color: var(--btn-hero-hover-text);
    border-color: var(--btn-hero-hover-border);
}

/* Examprayag Signature UI - 100% Unique Identity */
.signature-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.signature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--accent-rgb), 0.1);
}

/* Asymmetric "Focus" Cut */
.signature-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    background: var(--bg-page);
}

/* "Ignition" Progress Strip (Vertical) */
.ignition-strip {
    position: absolute;
    right: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.ignition-progress {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transition: height 1s ease-out;
}

/* Holographic Metadata Strip */
.holographic-metadata {
    position: absolute;
    bottom: 20px;
    left: 10px;
    padding: 6px 14px;
    background: rgba(var(--bg-card-rgb, 0, 0, 0), 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.signature-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.signature-price-tag {
    background: var(--bg-page);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-weight: 800;
}

/* Utility Overrides for Signature Look */
.bg-accent-10 {
    background-color: rgba(var(--accent-rgb), 0.1) !important;
}

.border-accent-20 {
    border-color: rgba(var(--accent-rgb), 0.2) !important;
}

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

.badge.extra-small {
    padding: 0.2rem 0.5rem;
}

/* Grid specific fixes */
.signature-card .btn {
    font-size: 0.85rem;
}

/* Essential Zinc/Gray Utilities for Signature Look */
.text-zinc-300 {
    color: var(--text-secondary) !important;
    opacity: 0.8;
}

.text-zinc-400 {
    color: var(--text-secondary) !important;
    opacity: 0.6;
}

.text-zinc-500 {
    color: var(--text-secondary) !important;
    opacity: 0.5;
}

.text-zinc-600 {
    color: var(--text-secondary) !important;
    opacity: 0.4;
}

.accent-glow {
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

.object-fit-cover {
    object-fit: cover !important;
}

/* --- ExamPrayag Unique Global Loader --- */
#ep-global-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-page, #000);
}

#ep-global-loader.ep-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

#ep-global-loader.ep-glass-loader {
    background: rgba(var(--bg-card-rgb, 0, 0, 0), 0.7) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.ep-loader-spinner {
    width: 60px;
    height: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-loader-spinner::before,
.ep-loader-spinner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent, #3b82f6);
}

.ep-loader-spinner::before {
    animation: ep-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.ep-loader-spinner::after {
    width: 70%;
    height: 70%;
    border-top-color: #9333ea;
    animation: ep-spin-reverse 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.ep-loader-text {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-primary, #fff);
    animation: ep-pulse 2s ease-in-out infinite;
}

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

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

@keyframes ep-pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}