/* ===== COMMUNITY CONTEST STYLES ===== */

/* Auth Notice Hover Effect */
.auth-notice:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    border-color: rgba(0, 255, 65, 0.6) !important;
}

/* Contest Header */
.contest-header {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.3) 0%, rgba(0, 168, 204, 0.3) 100%);
    padding: 4rem 0 3rem;
    text-align: center;
}

.contest-tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 1rem 0 2rem;
}

/* Contest Timer */
.contest-timer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0 1rem;
}

.timer-block {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #00ff41;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.timer-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--horror-primary);
    font-family: var(--font-heading);
    line-height: 1;
}

.timer-label {
    font-size: 0.9rem;
    color: #ffffff;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.timer-text {
    color: var(--battlefield-primary);
    font-size: 1rem;
    margin-top: 1rem;
    font-weight: 600;
}

/* Upload Section */
.upload-section {
    padding: 4rem 0;
}

.upload-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.upload-card h2 {
    color: var(--horror-primary);
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.upload-card > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Upload Form */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.8rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--horror-primary);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-upload-display {
    background: rgba(255, 255, 255, 0.05);
    border: 3px dashed rgba(255, 0, 0, 0.5);
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-display:hover {
    border-color: var(--horror-primary);
    background: rgba(255, 0, 0, 0.1);
}

.file-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.file-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

.file-upload-display.has-file {
    border-color: var(--battlefield-primary);
    background: rgba(0, 255, 65, 0.1);
}

.file-upload-display.has-file .file-text {
    color: var(--battlefield-primary);
    font-weight: 600;
}

.file-info {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Upload Progress */
.upload-progress {
    margin: 1rem 0;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.1);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 0, 0, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--horror-primary) 0%, var(--battlefield-primary) 100%);
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--battlefield-primary);
    font-weight: 600;
}

/* Submissions Section */
.submissions-section {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.sort-controls {
    display: flex;
    gap: 1rem;
}

.sort-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sort-btn:hover {
    border-color: var(--horror-primary);
    color: var(--horror-primary);
}

.sort-btn.active {
    background: var(--horror-primary);
    border-color: var(--horror-primary);
    color: white;
}

/* Submissions Grid */
.submissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.submission-card {
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.submission-card:hover {
    transform: translateY(-5px);
    border-color: var(--horror-primary);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

.submission-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--horror-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.submission-rank.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
}

.submission-rank.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
}

.submission-rank.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #f4a460);
    color: #000;
}

.submission-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.submission-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submission-video:hover .video-overlay {
    opacity: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: var(--horror-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.1);
}

.submission-info {
    padding: 1.5rem;
}

.submission-info h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.submission-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.uploader-name {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.submission-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.submission-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vote-btn {
    background: linear-gradient(135deg, var(--horror-primary), var(--horror-secondary));
    border: none;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.vote-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.5);
}

.vote-btn:active {
    transform: scale(0.95);
}

.vote-count {
    font-size: 1.2rem;
    color: var(--battlefield-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Loading & Empty States */
.loading-message,
.no-submissions {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

/* Rules Section */
.rules-section {
    padding: 4rem 0;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.rule-card {
    background: var(--bg-card);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.rule-card:hover {
    transform: translateY(-5px);
    border-color: var(--battlefield-primary);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.2);
}

.rule-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.rule-card h3 {
    color: var(--battlefield-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.rule-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
}

.pagination-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--battlefield-primary);
    color: var(--battlefield-primary);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: var(--battlefield-primary);
    border-color: var(--battlefield-primary);
    color: #000;
    font-weight: 700;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-dots {
    color: var(--text-secondary);
    padding: 0 0.5rem;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .contest-timer {
        gap: 1rem;
    }

    .timer-block {
        padding: 1rem 1.5rem;
        min-width: 80px;
    }

    .timer-value {
        font-size: 2rem;
    }

    .upload-card {
        padding: 2rem 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .submissions-grid {
        grid-template-columns: 1fr;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .pagination-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: 36px;
    }

    .pagination-buttons {
        gap: 0.3rem;
    }
}
