:root {
    /* Light theme */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --primary: #4361ee;
    --primary-hover: #3a56d4;
    --secondary: #6c757d;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f72585;
    --info: #7209b7;
    --green: #2ec4b6;
    --red: #e71d36;
}

[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #2d2d2d;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --border-color: #404040;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    --primary: #5a6ff0;
    --primary-hover: #4a5fd8;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-switch button {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: all 0.3s;
}

.theme-switch button:hover {
    transform: rotate(30deg);
    box-shadow: var(--shadow);
}

/* Exam Info Grid */
.exam-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

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

.info-icon {
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.info-content {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.info-value {
    font-size: 1.8rem;
    font-weight: 600;
}

.info-value.green { color: var(--green); }
.info-value.red { color: var(--red); }

/* Progress Section */
.progress-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.percentage {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.2rem;
}

.progress-container {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--primary));
    border-radius: 6px;
    width: 0%;
    transition: width 1s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 35px 35px;
    animation: moveStripes 2s linear infinite;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 35px 0; }
}

/* Clock Section */
.clock-section {
    margin-bottom: 2.5rem;
}

.current-clock {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.current-clock i {
    font-size: 2.5rem;
    color: var(--primary);
}

.clock-time {
    font-size: 2.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.clock-date {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    min-width: 150px;
    justify-content: center;
}

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

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

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

.btn-secondary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Notifications */
.notifications {
    margin-bottom: 2rem;
}

.notification {
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    animation: slideIn 0.5s ease;
}

.notification.warning {
    background: rgba(248, 150, 30, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.notification.critical {
    background: rgba(231, 29, 54, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    animation: pulse 2s infinite;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.hidden {
    display: none !important;
}

/* Footer */
.footer {
    margin-top: auto;
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .exam-info {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        min-width: auto;
    }

    .clock-time {
        font-size: 2rem;
    }

    .info-value {
        font-size: 1.5rem;
    }
}

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

    .info-card {
        flex-direction: column;
        text-align: center;
    }

    .current-clock {
        flex-direction: column;
        text-align: center;
    }
}
/* Add these to your existing styles.css */

/* Toast Notifications */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
    width: 100%;
}

.toast {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.success {
    border-left-color: var(--green);
}

.toast.error {
    border-left-color: var(--red);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

.toast .toast-icon {
    font-size: 1.2rem;
    min-width: 20px;
}

.toast .toast-message {
    flex: 1;
    font-size: 0.95rem;
}

.toast .toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.toast .toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease;
}

/* Add btn-warning class */
.btn-warning {
    background: var(--warning) !important;
    color: white !important;
}

.btn-warning:hover {
    background: #d9820d !important;
}

/* Pulse animation for visual feedback */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}
