:root {
    --bg-dark: #0f1116;
    --card-bg: rgba(25, 30, 40, 0.85); /* More opaque for better readability */
    --primary: #800000; /* Maroon */
    --primary-light: #a03030;
    --primary-glow: rgba(128, 0, 0, 0.3);
    --secondary: #006400; /* Forest Green */
    --accent: #22c55e;
    --danger: #ef4444;
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --glass-border: rgba(255, 255, 255, 0.12);
}

.fullscreen-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(10px);
    font-family: 'Tahoma', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

body {
    font-family: 'Tahoma', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    letter-spacing: 0.01em;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('exam-bg.png') no-repeat center center/cover;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 11, 16, 0.98) 0%, rgba(128, 0, 0, 0.2) 100%);
    backdrop-filter: blur(3px);
}

.container {
    width: 100%;
    max-width: 850px; /* Increased from 650px to accommodate long titles */
    padding: 24px;
    z-index: 1;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.7);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-container {
    text-align: center;
    margin-bottom: 24px;
}

.logo-container img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.3));
}

.header {
    margin-bottom: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.4rem;
    font-weight: bold;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.header h1 span {
    color: var(--primary-light);
    background: linear-gradient(to bottom, #fff, var(--primary-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.header .sub-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.duration-inputs {
    display: flex;
    gap: 12px;
}

.duration-inputs input {
    text-align: center;
}

label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px 20px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #b03030 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px -4px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px var(--primary-glow);
    filter: brightness(1.15);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 28px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 14px;
    padding: 12px 28px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Timer Specific Styles */
.timer-header {
    text-align: center;
    margin-bottom: 48px;
}

.timer-header h2 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.timer-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 48px;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.timer-unit span {
    font-size: 4.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    background: linear-gradient(to bottom, #fff 40%, var(--text-muted));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timer-unit label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    font-weight: 600;
}

.timer-separator {
    font-size: 3.5rem;
    font-weight: 700;
    padding-bottom: 25px;
    color: var(--primary-light);
    opacity: 0.6;
}

.progress-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
}

.progress-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, var(--primary-light), var(--secondary));
    transition: width 0.5s linear;
    border-radius: 6px;
}

.status-badge {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    padding: 8px 24px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 30px;
    width: fit-content;
    margin: 0 auto 40px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.policy-section {
    border-top: 1px solid var(--glass-border);
    padding-top: 24px;
    text-align: left;
}

.policy-section h4 {
    color: var(--primary-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.policy-section ul {
    list-style: none;
}

.policy-section li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.policy-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-light);
}

#start-session-btn {
    background: linear-gradient(135deg, #006400 0%, #004d00 100%);
    box-shadow: 0 10px 20px -5px rgba(0, 100, 0, 0.4);
}

/* Bottom Alert Toast */
.alert-toast {
    position: fixed;
    bottom: -150px; /* Hidden initially */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: rgba(10, 11, 16, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--primary-light);
    border-radius: 20px;
    padding: 24px;
    z-index: 1000;
    box-shadow: 0 -10px 40px rgba(0, 51, 102, 0.4);
    transition: bottom 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.alert-toast.visible {
    bottom: 40px;
}

.alert-toast-content {
    text-align: center;
}

.alert-toast h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--primary-light);
    font-weight: 700;
}

.alert-toast p {
    margin-bottom: 16px;
    color: var(--text-main);
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (max-width: 600px) {
    .card {
        padding: 30px 20px;
    }
    
    .timer-unit {
        min-width: 70px;
    }
    
    .timer-unit span {
        font-size: 3rem;
    }
    
    .timer-separator {
        font-size: 2rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
}

.footer-credits {
    margin-top: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 400;
}
