* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a0b2e 0%, #2d1b4e 50%, #4a1b6a 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Pattern with RenCon */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.1;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 40px,
            rgba(255, 215, 0, 0.1) 40px,
            rgba(255, 215, 0, 0.1) 80px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 40px,
            rgba(147, 112, 219, 0.1) 40px,
            rgba(147, 112, 219, 0.1) 80px
        );
}

.background-pattern::before {
    content: "RenCon";
    position: absolute;
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 215, 0, 0.05);
    transform: rotate(-15deg);
    top: 10%;
    left: 5%;
    animation: float-text 8s ease-in-out infinite;
}

.background-pattern::after {
    content: "RenCon";
    position: absolute;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: rgba(147, 112, 219, 0.05);
    transform: rotate(10deg);
    bottom: 20%;
    right: 10%;
    animation: float-text 6s ease-in-out infinite reverse;
}

@keyframes float-text {
    0%, 100% { transform: rotate(-15deg) translateY(0px); }
    50% { transform: rotate(-15deg) translateY(-20px); }
}

.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(147, 112, 219, 0.1) 0%, transparent 50%);
}

/* Magical Stars */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

.star-1 { top: 10%; left: 10%; animation-delay: 0s; }
.star-2 { top: 20%; left: 80%; animation-delay: 0.5s; }
.star-3 { top: 40%; left: 20%; animation-delay: 1s; }
.star-4 { top: 60%; left: 70%; animation-delay: 1.5s; }
.star-5 { top: 80%; left: 30%; animation-delay: 2s; }
.star-6 { top: 30%; left: 60%; animation-delay: 2.5s; }
.star-7 { top: 70%; left: 90%; animation-delay: 0.8s; }
.star-8 { top: 90%; left: 50%; animation-delay: 1.2s; }

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1);
        box-shadow: 0 0 5px #ffd700;
    }
    50% { 
        opacity: 1; 
        transform: scale(1.5);
        box-shadow: 0 0 20px #ffd700, 0 0 30px #ffd700;
    }
}

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 40px;
}

.title-section {
    flex: 1;
    min-width: 600px;
    text-align: left;
    margin-right: 40px;
}

.buttons-section {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
    flex: 0 0 auto;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {
    .header-content {
        gap: 30px;
    }
    
    .title-section {
        min-width: 500px;
        margin-right: 30px;
    }
}

@media (max-width: 900px) {
    .header-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .title-section {
        min-width: auto;
        text-align: center;
    }
    
    .buttons-section {
        justify-content: center;
    }
}

.judge-entry-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a0b2e;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.judge-entry-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

.judge-icon {
    font-size: 1.3rem;
}

.animation-toggle-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(155, 89, 182, 0.3);
    cursor: pointer;
}

.animation-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(155, 89, 182, 0.4);
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
}

.animation-toggle-btn.paused {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: rgba(231, 76, 60, 0.3);
}

.animation-toggle-btn.paused:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

.toggle-icon {
    font-size: 1.3rem;
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.3); }
}

.subtitle {
    font-size: 1.2rem;
    color: #dda0dd;
    font-weight: 300;
    letter-spacing: 2px;
}

/* Submissions Container */
.submissions-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Submission Boxes */
.submission-box {
    width: 350px;
    height: 380px;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(147, 112, 219, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    overflow: hidden;
    animation: float 8s ease-in-out infinite;
}

.submission-box:nth-child(1) { animation-delay: 0s; }
.submission-box:nth-child(2) { animation-delay: 1.5s; }
.submission-box:nth-child(3) { animation-delay: 3s; }
.submission-box:nth-child(4) { animation-delay: 4.5s; }
.submission-box:nth-child(5) { animation-delay: 6s; }

.submission-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.submission-box:hover::before {
    transform: translateX(100%);
}

.submission-box:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 
        0 15px 40px rgba(147, 112, 219, 0.3),
        0 0 30px rgba(255, 215, 0, 0.2);
}

.submission-box {
    cursor: grab;
    user-select: none;
}

.submission-box:active {
    cursor: grabbing;
}

.submission-box.paused {
    animation-play-state: paused;
}

/* Disable transitions when global animations are stopped */
.submission-box.no-transitions {
    transition: none !important;
}

@keyframes float {
    0% { 
        transform: rotate(0deg) translate(0px, 0px); 
    }
    25% { 
        transform: rotate(1deg) translate(15px, -10px); 
    }
    50% { 
        transform: rotate(-1deg) translate(-10px, -5px); 
    }
    75% { 
        transform: rotate(0.5deg) translate(8px, -8px); 
    }
    100% { 
        transform: rotate(0deg) translate(0px, 0px); 
    }
}

/* Box Content */
.box-content {
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.model-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tracks {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.track {
    background: rgba(147, 112, 219, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.3s ease;
    flex: 1;
}

.track:hover {
    background: rgba(147, 112, 219, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateX(5px);
}

.piece-name {
    font-size: 1rem;
    color: #e6e6fa;
    margin-bottom: 15px;
    font-style: italic;
    font-weight: 500;
}

/* Audio Player */
.audio-player {
    width: 100%;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Play Button */
.play-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

.play-btn.playing {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%) !important;
    animation: pulse 1s ease-in-out infinite;
}

.play-icon {
    color: #1a0b2e;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Progress Container */
.progress-container {
    position: relative;
    flex: 1;
    min-width: 120px;
}

.progress-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 2;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.progress-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}

.progress-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 3px;
}

/* Time Display */
.time-display {
    font-size: 0.75rem;
    color: #dda0dd;
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .submissions-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .submission-box {
        width: 90%;
        max-width: 380px;
        height: 360px;
    }
    
    .player-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .progress-container {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .submission-box {
        width: 95%;
        height: 340px;
    }
    
    .box-content {
        padding: 20px;
    }
    
    .track {
        padding: 15px;
    }
    
    .piece-name {
        font-size: 0.9rem;
    }
}

/* Model Popup Card */
.model-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 11, 46, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.popup-content {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 25px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 20px 60px rgba(147, 112, 219, 0.3),
        0 0 40px rgba(255, 215, 0, 0.2);
    animation: slideUp 0.4s ease-out;
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #ffd700;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.1);
}

.popup-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.popup-model-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.popup-model-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a0b2e;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.popup-body {
    color: #e6e6fa;
}

.popup-description {
    margin-bottom: 30px;
}

.model-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #dda0dd;
    margin-bottom: 20px;
}

.model-keywords {
    color: #ffd700;
    font-weight: 500;
    font-style: normal;
}

.popup-tracks {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup-tracks {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup-track {
    background: rgba(147, 112, 219, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.popup-track:hover {
    background: rgba(147, 112, 219, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateX(3px);
}

.popup-piece-name {
    font-size: 1rem;
    color: #e6e6fa;
    margin-bottom: 12px;
    font-style: italic;
    font-weight: 500;
}

.popup-audio-player {
    width: 100%;
}

.popup-player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.popup-play-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.popup-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

.popup-play-btn.playing {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%) !important;
    animation: pulse 1s ease-in-out infinite;
}

.popup-play-icon {
    color: #1a0b2e;
    font-size: 1rem;
    font-weight: bold;
}

.popup-progress-container {
    position: relative;
    flex: 1;
    min-width: 100px;
}

.popup-progress-slider {
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 2;
}

.popup-progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.popup-progress-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}

.popup-progress-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.popup-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 1;
}

.popup-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 3px;
}

.popup-time-display {
    font-size: 0.7rem;
    color: #dda0dd;
    font-weight: 500;
    min-width: 70px;
    text-align: right;
}

.popup-links h3 {
    color: #ffd700;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.link-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(147, 112, 219, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    color: #e6e6fa;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.link-btn:hover {
    background: rgba(147, 112, 219, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateX(5px);
    color: #ffd700;
}

.link-icon {
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive design for popup */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .title-section {
        text-align: center;
    }
    
    .popup-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .popup-model-name {
        font-size: 2rem;
    }
    
    .link-buttons {
        flex-direction: column;
    }
} 