/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== MAC WINDOW STYLES - CONSISTENT ACROSS ALL PAGES ===== */
.mac-window {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    height: auto;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

.mac-window-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 12px 12px 0 0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.mac-window-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 400px;
    max-height: calc(75vh - 70px);
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

/* Traffic lights */
.mac-traffic-lights {
    display: flex;
    gap: 8px;
}

.mac-traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mac-traffic-light.red { background: #ff5f56; }
.mac-traffic-light.yellow { background: #ffbd2e; }
.mac-traffic-light.green { background: #27c93f; }

/* ===== GRID BACKGROUND ===== */
.bg-grid {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ===== CUSTOM SCROLLBAR ===== */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===== MAIN LAYOUT - CONSISTENT CENTERING ===== */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0f172a;
}

.main-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 120px 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

#app {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* ===== TITLE BAR EXIT BUTTON ===== */
.title-exit-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(185, 28, 28, 0.1));
    color: #f87171;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-left: 12px;
}

.title-exit-button:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.15));
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.title-username {
    color: #60a5fa;
    font-weight: 600;
    margin-left: 4px;
}

/* ===== BACK LINK ===== */
.back-link {
    color: #60a5fa;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
}

/* ===== FOOTER STYLES - CLEAN WITH MENU LEFT & COPYRIGHT RIGHT ===== */
.typing-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #0f172a;
    border-top: 1px solid #1e293b;
    padding: 14px 24px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Left side menu */
.footer-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
    letter-spacing: 0.3px;
}

.footer-link:hover {
    color: #60a5fa;
}

.footer-separator {
    color: #334155;
    font-size: 14px;
}

/* Right side copyright */
.footer-copyright {
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
}

/* ===== USER SECTION (for logged in users) ===== */
.user-section {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 1001;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1e293b;
    color: #60a5fa;
    padding: 8px 18px;
    border-radius: 40px;
    border: 1px solid #334155;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}

.user-badge svg {
    width: 16px;
    height: 16px;
}

.user-badge button {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.user-badge button:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ===== HIDDEN CLASS ===== */
.hidden {
    display: none !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 900px) {
    .mac-window {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .mac-window-content {
        padding: 20px;
        max-height: calc(80vh - 70px);
    }
    
    .main-wrapper {
        padding: 30px 20px 120px 20px;
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        padding: 20px 16px 140px 16px;
    }
    
    .mac-window {
        max-height: 85vh;
    }
    
    .mac-window-content {
        padding: 18px;
        max-height: calc(85vh - 70px);
        min-height: 350px;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .footer-menu {
        gap: 12px;
    }
    
    .footer-copyright {
        white-space: normal;
        text-align: left;
    }
    
    .user-section {
        bottom: 100px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .main-wrapper {
        padding: 16px 12px 160px 12px;
    }
    
    .mac-window-content {
        padding: 16px;
        min-height: 300px;
    }
    
    .footer-menu {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .footer-link {
        font-size: 13px;
    }
    
    .footer-separator {
        margin: 0 2px;
    }
    
    .user-badge {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* ===== INSTRUCTION PAGE SPECIFIC STYLES ===== */
.instruction-step {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: transform 0.2s ease;
}

.instruction-step:hover {
    transform: translateX(4px);
    border-color: #3b82f6;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ===== PRIVACY & TERMS PAGE STYLES ===== */
.privacy-section, .terms-section {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.privacy-section h2, .terms-section h2 {
    color: #60a5fa;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    border-bottom: 1px solid #334155;
    padding-bottom: 8px;
}

.privacy-section p, .terms-section p {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* ===== LIST STYLES ===== */
.custom-list {
    list-style: disc;
    padding-left: 24px;
    color: #cbd5e1;
    margin: 12px 0;
}

.custom-list li {
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ===== LAST UPDATED TEXT ===== */
.last-updated {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ===== ABOUT PAGE STATS CARDS ===== */
.stat-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #3b82f6;
}

/* ===== COURSE TAGS ===== */
.course-tag {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin: 2px;
}

/* ===== SERVICE ITEMS ===== */
.service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 40px;
    transition: all 0.2s ease;
}

.service-item:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(2px);
}

/* ===== CERTIFICATION BADGES ===== */
.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.cert-badge.iso {
    background: linear-gradient(135deg, #2563eb20, #3b82f620);
    border: 1px solid #3b82f6;
    color: #60a5fa;
}

.cert-badge.govt {
    background: linear-gradient(135deg, #16a34a20, #22c55e20);
    border: 1px solid #22c55e;
    color: #4ade80;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mac-window {
    animation: fadeIn 0.3s ease-out;
}