/* Dark Theme Styles for BrightExam */

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #252525;
    --bg-hover: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #333333;
    --primary-color: #00D4AA;
    --secondary-color: #7C3AED;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 70px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navigation */
.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Flash Messages */
.flash-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.flash-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.flash-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
}

.flash-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--info-color);
    color: var(--info-color);
}

.flash-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-body {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-danger {
    background-color: var(--error-color);
    color: #fff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.form-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-right: 0.75rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.3);
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-label:hover .toggle-slider {
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
}

.toggle-label-text {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.toggle-label-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: auto;
    cursor: pointer;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background-color: var(--bg-secondary);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background-color: var(--bg-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Test Taking UI */
.question-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.question-number {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.option-group {
    margin-bottom: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-label:hover {
    background-color: var(--bg-hover);
    border-color: var(--primary-color);
}

.option-label input[type="radio"]:checked + span {
    color: var(--primary-color);
}

.option-label input[type="radio"]:checked ~ .option-label {
    border-color: var(--primary-color);
    background-color: rgba(0, 212, 170, 0.1);
}

.test-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    gap: 1rem;
}

.test-nav button {
    transition: all 0.2s ease;
}

.test-nav button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--info-color);
}

.badge-pending {
    background-color: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.badge-approved {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.badge-rejected {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex {
    display: flex;
}

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

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

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 212, 170, 0.1) 0%, transparent 70%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

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

.card-stack {
    position: relative;
    width: 300px;
    height: 400px;
}

.stack-card {
    position: absolute;
    width: 100%;
    padding: 2rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

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

.card-1 {
    top: 0;
    left: 0;
    z-index: 3;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000;
}

.card-2 {
    top: 20px;
    left: 20px;
    z-index: 2;
    background-color: var(--bg-card);
}

.card-3 {
    top: 40px;
    left: 40px;
    z-index: 1;
    background-color: var(--bg-secondary);
    opacity: 0.8;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    margin-top: 4rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

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

.feature-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.2);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.feature-card ul li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.feature-card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.btn-warning {
    background-color: var(--warning-color);
    color: #000;
}

.btn-warning:hover {
    background-color: #d97706;
    color: #fff;
}

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

/* Sidebar Styles */
.app-layout {
    display: flex;
    min-height: calc(100vh - 60px);
    width: 100%;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 10;
    display: block !important;
    visibility: visible !important;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-header {
    padding: 1rem 0.5rem;
    text-align: center;
}

.sidebar.collapsed .sidebar-header h3,
.sidebar.collapsed .sidebar-user,
.sidebar.collapsed .sidebar-role,
.sidebar.collapsed .sidebar-roll {
    display: none;
}

.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-item span:not(.sidebar-icon) {
    display: none;
}

.sidebar.collapsed .sidebar-section-title {
    display: none;
}

.sidebar.collapsed .sidebar-icon {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar.collapsed .sidebar-divider {
    margin: 0.5rem 0.25rem;
}

/* Hover effect when collapsed */
.sidebar.collapsed-hover {
    width: 260px;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
}

.sidebar.collapsed-hover .sidebar-header h3,
.sidebar.collapsed-hover .sidebar-user,
.sidebar.collapsed-hover .sidebar-role,
.sidebar.collapsed-hover .sidebar-roll,
.sidebar.collapsed-hover .sidebar-item span:not(.sidebar-icon),
.sidebar.collapsed-hover .sidebar-section-title {
    opacity: 1;
    visibility: visible;
}

.sidebar.collapsed-hover .sidebar-item {
    justify-content: flex-start;
    padding: 0.75rem 1.5rem;
}

.sidebar.collapsed-hover .sidebar-header {
    padding: 1.5rem;
    text-align: left;
}

/* Navbar Toggle Button */
.navbar-toggle {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.8rem !important;
    background-color: var(--primary-color) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #000 !important;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    font-family: inherit;
    margin-right: 1rem !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    z-index: 999 !important;
    width: 45px !important;
    height: 45px !important;
    min-width: 45px !important;
}

.navbar-toggle:hover {
    background-color: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.navbar-toggle:active {
    transform: translateY(0);
}

.navbar-toggle span:first-child {
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.sidebar-user {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.25rem 0;
}

.sidebar-role,
.sidebar-roll {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.25rem 0;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    border-left-color: var(--primary-color);
}

.sidebar-item.active {
    background-color: rgba(0, 212, 170, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.sidebar-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-section {
    margin-top: 1rem;
}

.sidebar-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.sidebar-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1rem 0;
}

.sidebar-logout {
    color: var(--error-color);
}

.sidebar-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.content-wrapper {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
    margin-left: 260px;
    width: calc(100% - 260px);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

.content-wrapper.sidebar-collapsed {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* Responsive */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        left: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .content-wrapper.sidebar-collapsed {
        margin-left: 0;
        width: 100%;
    }

    .sidebar.collapsed {
        width: 0;
        overflow: hidden;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem 0;
    }

    .sidebar-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 0.75rem 1rem;
    }

    .sidebar-item.active {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }

    .sidebar-section {
        display: none;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .table {
        font-size: 0.9rem;
    }

    .table th,
    .table td {
        padding: 0.75rem;
    }

    .test-nav {
        flex-direction: column;
        gap: 1rem;
    }

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

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

/* Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.pricing-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.2);
}

.pricing-card.popular {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

.pricing-card.popular:hover {
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.4);
}

/* Paywall Styles */
.paywall-banner {
    background-color: var(--warning-color);
    color: #000;
    border: 2px solid var(--warning-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.paywall-banner .lock-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.paywall-banner .content {
    flex: 1;
}

.paywall-banner h3 {
    margin-bottom: 0.5rem;
    color: #000;
}

.paywall-banner a {
    color: #000;
    text-decoration: underline;
    font-weight: bold;
}

.locked-item {
    position: relative;
    opacity: 0.6;
}

.locked-item::before {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.5rem;
    border-radius: 50%;
}

    .card-stack {
        width: 250px;
        height: 300px;
    }

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

