/**
 * Ole Miss Sports Layout - Modern Flexbox Design
 * 16:9 responsive layout with natural document flow
 */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #14213d;
    color: #fff;
    overflow: hidden;
    font-family: 'Poppins', 'Smooch Sans', sans-serif;
    height: 100vh;
}

/* Main container - 16:9 aspect ratio responsive */
.olemiss-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Responsive scaling for different screen sizes */
@media (min-aspect-ratio: 16/9) {
    .olemiss-container {
        height: 56.25vw;
        width: 100vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    .olemiss-container {
        width: 177.78vh;
        height: 100vh;
    }
}

/* Background layer */
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gradient-overlay {
    position: absolute;
    top: 31%;
    left: 0;
    width: 100%;
    height: 27.8%;
    background: url('/images/olemiss/gradient-overlay.png') no-repeat center;
    background-size: cover;
    z-index: 2;
}

/* Header section */
.sports-header {
    text-align: center;
    z-index: 10;
    margin-top: 8vh;
}

.sports-category {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 600;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.sports-label {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 200;
    color: #fff;
    font-family: 'Smooch Sans', sans-serif;
    text-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
}

/* VS section */
.vs-section {
    margin-top: -8vh;
    text-align: center;
    z-index: 10;
}

.vs-text {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 600;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    text-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
}

/* Teams section */
.teams-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    flex: 1;
    z-index: 8;
}

.home-team,
.away-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.team-logo {
    width: 250px;
    height: 160px;
    margin-bottom: 1rem;
}

.away-team .team-logo {
    width: clamp(60px, 8vw, 170px);
}

.team-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-name-card-bg {
    width: clamp(200px, 25vw, 450px);
    height: auto;
}

.team-name {
    position: absolute;
    font-size: clamp(1rem, 2.5vw, 2.5rem);
    font-weight: 600;
    color: #585858;
    font-family: 'Smooch Sans', sans-serif;
    text-align: center;
    width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Event info footer */
.event-info {
    text-align: center;
    z-index: 10;
    margin-bottom: 8vh;
}

.event-date {
    font-size: clamp(1.5rem, 4vw, 3.125rem);
    font-weight: bold;
    color: #303030;
    font-family: 'Smooch Sans', sans-serif;
    background: #9cf61f;
    padding: clamp(0.5rem, 1.5vw, 1rem);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: inline-block;
}

.event-location {
    font-size: clamp(1.5rem, 4vw, 3.125rem);
    font-weight: 600;
    color: #fff;
    font-family: 'Smooch Sans', sans-serif;
    padding: clamp(0.5rem, 1.5vw, 1rem);
    border-radius: 8px;
}

/* Responsive scaling */
@media (max-width: 1920px) {
    .render-area {
        transform: scale(var(--scale-factor, 1));
        transform-origin: center center;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sports-category {
        font-size: 48px;
    }

    .sports-label {
        font-size: 20px;
    }

    .home-team-logo {
        width: 150px;
    }

    .away-team-logo {
        width: 100px;
    }

    .home-team-label,
    .away-team-label {
        font-size: 24px;
    }

    .vs-text {
        font-size: 36px;
    }

    .event-date-label,
    .event-location {
        font-size: 28px;
    }
}

/* Loading state */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    font-size: 1.2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #9cf61f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
