:root {
    --primary-color: #FF69B4;
    --secondary-color: #87CEEB;
    --accent-color: #FFD700;
    --background-color: #F0F8FF;
    --text-color: #333;
}

body {
    background-color: var(--background-color);
    font-family: 'Karla', sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.header {
    background-color: white;
    padding: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    font-size: 1.25rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .header {
        padding: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    .user-info {
        gap: 0.25rem;
    }
    
    .user-avatar {
        font-size: 1.15rem;
    }
}

.avatar-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.avatar-btn {
    font-size: 2rem !important;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
}

.avatar-btn:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.avatar-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.avatar-selector {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    display: none;
}

.avatar-selector.active {
    display: grid;
}

.avatar-option {
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.avatar-option:hover {
    background-color: var(--background-color);
}

.score-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.container {
    max-width: 800px;
    padding: 1.5rem;
}

.btn-marker:disabled {
    background-color: var(--primary-color);
    opacity: 0.7;
    cursor: not-allowed;
}

.title {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2.25rem;
    text-shadow: 2px 2px var(--accent-color);
}

.video-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    margin-bottom: 1rem;
}

video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    cursor: pointer;
    background: #000; /* Add black background for letterboxing */
}

/* Hide default video controls */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-timeline,
video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display,
video::-webkit-media-controls-mute-button,
video::-webkit-media-controls-toggle-closed-captions-button {
    display: none !important;
}

.controls {
    background-color: white;
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-marker {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    margin: 0.5rem;
    border-radius: 50px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    transition: transform 0.2s;
}

.btn-marker:hover {
    transform: scale(1.05);
    background-color: var(--secondary-color);
}

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

.score-display {
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin: 1rem 0;
}

.leaderboard {
    background-color: white;
    padding: 1rem;
    border-radius: 15px;
    margin-top: 2rem;
}

.leaderboard-title {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 1rem;
}

.score-animation {
    animation: popScore 0.5s ease-out;
}

.marker-flash {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 105, 180, 0.3);
    animation: flash 1s ease-out;
    pointer-events: none;
}

.video-controls {
    background: white;
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.video-controls {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-speed {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--secondary-color);
    transition: all 0.2s ease;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

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

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

.frame-info {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

#prev-frame-btn, #next-frame-btn {
    min-width: 120px;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    user-select: none;
}

@media (max-width: 768px) {
    #prev-frame-btn, #next-frame-btn {
        min-width: 90px;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        touch-action: manipulation;
    }
    
    .video-controls {
        padding: 1rem 0.75rem;
    }
    
    .speed-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-speed {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

@keyframes popScore {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes flash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
    }
    
    .title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
        text-shadow: 1px 1px var(--accent-color);
    }
    .marker-controls {
        padding: 0.5rem;
    }
    .btn-marker {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    .score-display {
        font-size: 1.25rem;
    }
}

.marker-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.marker-controls .btn-marker {
    margin: 0;
    width: 100%;
    max-width: 800px;
    display: block;
    margin: 0 auto;
}

.btn-marker {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    transition: transform 0.2s;
}

.btn-marker:hover {
    transform: scale(1.02);
    background-color: var(--secondary-color);
}

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

/* Add padding to prevent content from being hidden behind sticky footer */
#analysis-container {
    padding-bottom: 5rem;
}