/* ===== CSS VARIABLES ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0f172a;
    --accent: #22d3ee;
    --success: #22c55e;
    --warning: #f97316;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

/* ===== BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    background-attachment: fixed;
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
}

header img {
    width: 60px;
    height: auto;
    margin-bottom: 8px;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2px;
}

header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== MAIN GRID LAYOUT ===== */
main.grid-layout {
    flex: 1;
    padding: 20px 16px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    main.grid-layout {
        grid-template-columns: 1fr 1fr;
        padding: 24px;
    }
}

/* ===== PANEL CARDS ===== */
.panel-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    background: rgba(99, 102, 241, 0.1);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.card-icon {
    font-size: 1.3rem;
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ===== TOPIC CARD ===== */
.topic-card .card-header {
    background: rgba(34, 211, 238, 0.1);
}

.topic-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.topic-content {
    text-align: center;
}

.topic-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.topic-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-white);
}

.topic-description {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== COUNTDOWN CARD ===== */
.countdown-card .card-header {
    background: rgba(239, 68, 68, 0.1);
}

.countdown-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.countdown-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    background: var(--bg-dark);
    padding: 8px 0;
    border-radius: 10px;
    width: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-separator {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-muted);
}

.deadline-text {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--warning);
    font-weight: 500;
}

/* ===== UPLOAD CARD ===== */
.upload-card .card-header {
    background: rgba(34, 197, 94, 0.1);
}

/* ===== SCHEDULE CARD ===== */
.schedule-card .card-header {
    background: rgba(99, 102, 241, 0.1);
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-white);
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-note {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--warning);
    font-weight: 500;
}

.form-hint {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-group input[type="url"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-white);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input[type="url"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input[type="url"]::placeholder {
    color: var(--text-muted);
}

/* ===== FILE UPLOAD ===== */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-input);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.upload-text {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.upload-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.selected-file {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    color: var(--success);
    font-size: 0.85rem;
}

.file-icon {
    font-size: 1.1rem;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== SUBMIT BUTTON ===== */
.submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    margin-top: 4px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-icon {
    font-size: 1.1rem;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 14px;
    padding-left: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid var(--bg-card);
}

.timeline-item.completed .timeline-dot {
    background: var(--success);
}

.timeline-item.current .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.timeline-title {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== RULES ===== */
.rules-section {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.rules-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent);
}

.rules-list {
    list-style: none;
    padding: 0;
}

.rules-list li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rules-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-size: 0.8rem;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer .contact {
    margin-top: 4px;
    font-size: 0.75rem;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    header {
        padding: 24px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .countdown-number {
        font-size: 3rem;
        padding: 12px 20px;
        width: 90px;
    }

    .topic-title {
        font-size: 1.6rem;
    }
}