@font-face { font-family: pricedown; src: url('/pricedown bl.ttf'); } 
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    background: url('/assets/img/wp4.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

/* Timer Top Bar - 15% height */
.timer-top-bar {
    width: 100%;
    height: 15%;
    min-height: 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3px, 0.5vw, 8px);
    gap: clamp(3px, 0.5vw, 8px);
    border-bottom: 2px solid rgba(195, 0, 22, 0.3);
    overflow: hidden;
}

/* WOD Container - 4 Vertical Blocks - 85% height */
.wod-container {
    width: 100%;
    height: 85%;
    display: flex;
    gap: clamp(5px, 0.5vw, 10px);
    padding: clamp(5px, 0.5vw, 10px);
    overflow: hidden;
    position: relative;
}

/* Individual WOD Block - 25% width each */
.wod-block {
    width: 25%;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: #fff;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

h1 {
    width: 100%;
    background-color: #f1f1f1;
    color: rgb(58, 12, 163);
    padding: clamp(6px, 1vh, 12px) clamp(5px, 1vw, 10px);
    text-align: center;
    font-family: 'pricedown', sans-serif;
    display: block;
    border-bottom: 2px solid rgb(58, 12, 163);
    text-transform: uppercase;
    font-size: clamp(15px, 2.5vw, 28px);
    line-height: 1.2;
    word-wrap: break-word;
    flex-shrink: 0;
}

.text-wod {
    background-color: rgba(0, 0, 0, 0.75);
    padding: clamp(6px, 1vh, 16px) clamp(6px, 1vw, 12px);
    font-size: clamp(14px, 1.8vw, 36px);
    line-height: 1.4;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 0.6vh, 8px);
    overflow-y: auto;
    flex-grow: 1;
}

h2 {
    width: 100%;
    background-color: #747476;
    color: #0a090e;
    padding: clamp(3px, 0.6vh, 8px) clamp(4px, 0.8vw, 8px);
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: clamp(10px, 1.4vw, 18px);
    display: block;
    text-transform: uppercase;
    line-height: 1.2;
    word-wrap: break-word;
    flex-shrink: 0;
}

p {
    text-transform: uppercase;
    color: #fff;
    margin-bottom: clamp(3px, 0.6vh, 8px);
    text-align: center;
    font-size: clamp(10px, 1.2vw, 14px);
    line-height: 1.3;
}

.logo {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: clamp(100px, 15vw, 200px);
}

/* Panel frames */
.panel-frame {
    background: rgba(0, 0, 0, 0.3);
    border-radius: clamp(4px, 0.5vw, 8px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    will-change: transform, opacity;
    transition: transform 300ms ease, box-shadow 300ms ease, opacity 300ms ease;
    height: 100%;
}

/* Expand Button */
.expand-btn {
    position: absolute;
    top: clamp(3px, 0.4vh, 6px);
    right: clamp(3px, 0.4vw, 6px);
    z-index: 30;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    width: clamp(24px, 2.5vw, 30px);
    height: clamp(24px, 2.5vw, 30px);
    font-size: clamp(13px, 1.6vw, 18px);
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    transition: transform 180ms ease, background-color 180ms ease, opacity 180ms ease;
    opacity: 0.95;
}

.expand-btn:hover {
    transform: scale(1.08);
    background: rgba(0,0,0,0.6);
}

.expand-btn:focus {
    outline: 2px solid rgba(255,255,255,0.18);
}

/* Expanded State - Full Screen within wod-container */
.panel-frame.expanded {
    position: fixed;
    top: 15%;
    left: 0;
    width: 100%;
    height: 85%;
    padding: clamp(15px, 2vw, 30px);
    background: rgba(0,0,0,0.92);
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7);
    animation: expandIn 260ms cubic-bezier(.2,.9,.2,1);
    border-radius: 0;
}

@keyframes expandIn {
    from { transform: scale(0.98); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* Enlarged Text Styling */
.panel-frame.expanded h1 {
    font-size: clamp(28px, 6vw, 56px) !important;
    padding: clamp(10px, 2vh, 20px) clamp(8px, 1.5vw, 16px) !important;
}

.panel-frame.expanded h2 {
    font-size: clamp(20px, 4vw, 40px) !important;
    padding: clamp(8px, 1.5vh, 16px) clamp(6px, 1.2vw, 12px) !important;
}

.panel-frame.expanded .text-wod {
    font-size: clamp(16px, 2.2vw, 44px) !important;
    line-height: 1.22;
    overflow-y: auto;
    flex-grow: 1;
    padding: clamp(12px, 2vh, 24px) clamp(10px, 1.5vw, 18px) !important;
}

.panel-frame.expanded p {
    font-size: clamp(16px, 2.8vw, 32px) !important;
}

/* Dim Other Blocks When One is Expanded */
.wod-container.has-expanded .panel-frame.expanded-capable:not(.expanded) {
    opacity: 0.2;
    pointer-events: none;
}

/* Expanded Button Style */
.panel-frame.expanded .expand-btn {
    background: rgba(255,255,255,0.95);
    color: #000;
    font-size: clamp(18px, 2.5vw, 24px);
    width: clamp(32px, 3.5vw, 40px);
    height: clamp(32px, 3.5vw, 40px);
}

/* Media Queries */
@media (max-width: 1200px) {
    .wod-block {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .timer-top-bar {
        height: 12%;
    }
    
    .wod-container {
        height: 88%;
        flex-direction: column;
    }
    
    .wod-block {
        width: 100%;
        height: 50%;
    }
}