/* Base Styles */
BODY, TD, B {
    FONT-FAMILY: arial, helvetica, sans-serif;
    FONT-SIZE: 9pt;
}

/* Remove all default body padding/margin */
body {
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide header by default - only show on specific screens */
.pageheader {
    display: none !important;
}

.anm_meldung {
    COLOR: #000;
    font-weight: bold;
}

td.anm_head {
    COLOR: #5E6E87;
    background-color: #BDC6DE;
    FONT-SIZE: 12pt;
    font-weight: bold;
    padding: 5px;
    padding-left: 10px;
}

A:link {
    COLOR: #0000cc;
    TEXT-DECORATION: underline;
}

A:visited {
    COLOR: #666666;
    TEXT-DECORATION: underline;
}

input.anm_button {
    COLOR: #9D0102;
    background-color: #ffffff;
    border: #cccccc 1px solid;
}

/* Start Screen Styles */
#startScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f8f9fa;
    padding: 0;
    margin: 0;
}

/* Show header on course list */
body:has(#startScreen[style*="display: flex"]) .pageheader,
body:has(#finalTimerScreen[style*="display: flex"]) .pageheader {
    display: none !important;
}

/* Decrease size of scrolled header */
body:has(#courseListScreen[style*="display: block"]) .pageheader.scrolled {
    height: 55px;
}

body:has(#courseListScreen[style*="display: block"]) .pageheader{
    display: block !important;
}

.start-content {
    text-align: center;
    max-width: 600px;
    padding: 60px 40px;
}

.trophy-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

#startScreen h1 {
    color: #1a1a1a;
    font-size: 42px;
    margin: 0 0 16px 0;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #6c757d;
    font-size: 18px;
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.5;
}

#startBtn {
    padding: 16px 48px;
    font-size: 18px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    font-size: 16px;
    display: inline-block;
}

#startBtn:hover {
    background: #333;
    transform: translateY(-1px);
}

#startBtn:active {
    transform: translateY(0);
}

.instructions {
    margin-top: 48px;
    color: #6c757d;
    font-size: 15px;
    line-height: 1.8;
}

.instructions p {
    margin: 8px 0;
}

/* Timer Container */
#timerContainer {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    flex-direction: column;
    gap: 8px;
}

#timerOverlay {
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

#timerDisplay {
    color: #00ff88;
    font-size: 36px;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    letter-spacing: 2px;
    padding: 20px 30px;
    text-align: center;
    transition: color 0.5s ease;
}

#resetContainer {
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 0;
}

#resetBtn {
    width: 100%;
    padding: 12px 30px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
}

#resetBtn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

#resetBtn:active {
    background: rgba(255, 255, 255, 0.05);
}

/* Course List Screen - Apply exact TU Berlin styles */
#courseListScreen {
    display: none;
    /* From .layout-1 */
    background-color: #f6f6f6;
    /* From body */
    color: #000;
    font-family: "Muli", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    max-width: 100vw;
    overflow: hidden scroll;
    padding-top: 146px;
    min-height: 100vh;
}

/* Default header styling for course list */
body:has(#courseListScreen[style*="display: block"]) .pageheader {
    height: 146px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 10px 0px;
    transition: height 0.3s ease;
    background-color: #fff;
    z-index: 1030;
    background-image: linear-gradient(90deg, #fff, #f6f6f6);
    background-size: 100% 45%;
    background-repeat: no-repeat;
    background-position: top right;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

#courseListScreen .fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

#courseListScreen .headerrow {
    margin-left: calc(50% - 49.5vw + 0);
    margin-right: calc(50% - 49.5vw + 0);
    max-width: none;
    max-height: 700px;
    overflow: hidden;
}

#courseListScreen .contentrow {
    min-height: 50%;
    padding-top: 30px;
}

#courseListScreen #breadcrumb {
    font-size: 0.85rem;
}

#courseListScreen .footerwrap {
    background: #f6f6f6;
    min-height: 150px;
    max-width: 100%;
    overflow: hidden;
}

#courseListScreen #timerContainer {
    display: none !important;
}

#mainContent {
    display: none;
    padding: 20px;
    padding-bottom: 50px;
    background: white;
    min-height: 100vh;
}

/* Header in main content screen - same as course list by default */
body:has(#mainContent[style*="display: block"]) .pageheader {
    height: 146px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background-color: #fff;
    background-image: linear-gradient(90deg, #fff, #f6f6f6);
    background-size: 100% 45%;
    background-repeat: no-repeat;
    background-position: top right;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 10px 0px;
    transition: height 0.3s ease, background 0.3s ease;
}

/* Scrolled state - much smaller header (only applies to mainContent screen) */
body:has(#mainContent[style*="display: block"]) .pageheader.scrolled {
    height: 55px;
    background-image: none;
}

body:has(#mainContent[style*="display: block"]) .pageheader.scrolled .logoarea_logo img {
    max-height: 35px !important;
    transition: all 0.3s ease;
}

body:has(#mainContent[style*="display: block"]) .pageheader.scrolled .logoarea_claim {
    font-size: 10px;
    transition: font-size 0.3s ease;
}

body:has(#mainContent[style*="display: block"]) .pageheader.scrolled .naviarea {
    transform: scale(0.7);
    transform-origin: top right;
    transition: transform 0.3s ease;
}

/* Ensure form displays properly */
#mainContent form {
    max-width: 100%;
}

/* Final Timer Screen */
#finalTimerScreen {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 0;
    margin: 0;
}

.final-timer-content {
    text-align: center;
    max-width: 600px;
    padding: 60px 40px;
}

.checkmark-icon {
    font-size: 80px;
    margin-bottom: 20px;
    color: #00ff88;
}

#finalTimerScreen h1 {
    color: white;
    font-size: 36px;
    margin: 0 0 40px 0;
    font-weight: 600;
}

#finalTimerDisplay {
    color: #00ff88;
    font-size: 72px;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    letter-spacing: 4px;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.final-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    margin-bottom: 40px;
    font-weight: 400;
}

#finalRestartBtn {
    padding: 16px 48px;
    font-size: 18px;
    background: white;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

#finalRestartBtn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

#finalRestartBtn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .start-content {
        padding: 40px 20px;
    }

    #startScreen h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 16px;
    }

    #startBtn {
        padding: 14px 36px;
        font-size: 16px;
    }

    .trophy-icon {
        font-size: 48px;
    }

    #timerContainer {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    #timerDisplay {
        font-size: 28px;
        padding: 16px 24px;
    }

    #resetBtn {
        padding: 10px 24px;
        font-size: 12px;
    }

    .final-timer-content {
        padding: 40px 20px;
    }

    #finalTimerScreen h1 {
        font-size: 28px;
    }

    #finalTimerDisplay {
        font-size: 56px;
    }

    .checkmark-icon {
        font-size: 60px;
    }

    .final-subtitle {
        font-size: 18px;
    }

    #finalRestartBtn {
        padding: 14px 36px;
        font-size: 16px;
    }
}
