/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #504d2c;
    background: rgb(238, 66, 66);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 60px);
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    text-align: center;
    color: #dc2626;
    margin-bottom: 15px;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    background: #f8f9fa;
    color: #495057;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

/* Class Analysis Section - Updated to match competition card style */
.class-analysis {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.class-analysis h2 {
    color: #dc2626;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(220, 38, 38, 0.1);
}

/* No data card for consistent styling */
.no-data-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.no-data-card .no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    font-size: 1.1rem;
}

/* Competitions Section */
.competitions {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.competitions h2 {
    color: #dc2626;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(220, 38, 38, 0.1);
}

.competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.competition-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.competition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 20px;
    text-align: center;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

.winners-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.winner-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.winner-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.position-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e) !important;
    color: #dc2626;
    font-weight: bold;
    border: 2px solid #dc2626;
}

.position-2 {
    background: #c0c0c0 !important;
    color: #dc2626;
    font-weight: bold;
    border: 2px solid #dc2626;
}

.position-3 {
    background: #cd7f32 !important;
    color: white;
    font-weight: bold;
}

.position-4 {
    background: linear-gradient(135deg, #ffffff, #f1f5f9) !important;
    color: #dc2626;
    font-weight: bold;
    border: 1px solid #dc2626;
}

.position-5 {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    color: white;
    font-weight: bold;
}

.position {
    font-size: 2rem;
    margin-right: 15px;
    min-width: 50px;
    text-align: center;
}

.winner-info {
    flex: 1;
}

.winner-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.winner-class {
    font-size: 0.9rem;
    color: black;
    font-weight: 500;
}

.no-winners, .no-data, .no-competitions {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Admin Panel Styles */
.admin-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    color: #dc2626;
    margin-bottom: 20px;
    border-bottom: 3px solid #dc2626;
    padding-bottom: 10px;
}

.form-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Winners Section */
.winners-section {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    background: #f8f9fa;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h3 {
    color: #495057;
    margin: 0;
}

.winner-entry {
    display: grid;
    grid-template-columns: auto 1fr 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.position-badge {
    background: #dc2626;
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.position-badge.gold { background: #ffd700; color: #333; }
.position-badge.silver { background: #c0c0c0; color: #333; }
.position-badge.bronze { background: #cd7f32; color: white; }

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #dc2626;
    color: white;
}

.btn-primary:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #d39e00;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #c82333;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Preview Section */
.preview-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.preview-section h2 {
    color: #dc2626;
    margin-bottom: 20px;
    border-bottom: 3px solid #dc2626;
    padding-bottom: 10px;
}

.preview-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .competitions-grid {
        grid-template-columns: 1fr;
    }
    
    .winner-entry {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    nav {
        flex-direction: column;
        gap: 10px;
    }
}