/* Reset and 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: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    height: 40px;
    width: auto;
    margin-right: 15px;
    vertical-align: middle;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.year-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-selector label {
    font-weight: 500;
    font-size: 1.1rem;
}

.year-selector select {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background-color: white;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-selector select:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Navigation Styles */
nav {
    background-color: #34495e;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 15px 25px;
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background-color: #3498db;
    color: white;
    border-bottom-color: #2980b9;
}

/* Main Content */
main {
    padding: 40px 0;
    min-height: 70vh;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 300;
}

.result-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.result-link {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.result-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Content Section */
.content-section {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.content-section h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 400;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 1rem;
}

.results-table thead {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
}

.results-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.3s ease;
}

.results-table td:nth-child(2),
.results-table td:nth-child(3),
.results-table td:nth-child(4),
.results-table td:nth-child(5),
.results-table td:nth-child(6),
.results-table td:nth-child(7) {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}



.results-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Medal Row Styles */
.results-table tr.gold {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
}

.results-table tr.silver {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), rgba(192, 192, 192, 0.05));
}

.results-table tr.bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), rgba(205, 127, 50, 0.05));
}

.results-table tr.gold:hover,
.results-table tr.silver:hover,
.results-table tr.bronze:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Stats Section */
.stats-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

.stats-section h4 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 400;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* Footer Styles */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0 20px;
    margin-top: 50px;
}

.year-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
}

.year-tab {
    display: inline-block;
    padding: 8px 12px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.year-tab:hover,
.year-tab.active {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.team-info {
    margin-bottom: 20px;
}

.team-info h4 {
    color: #ecf0f1;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.team-members {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.team-member {
    background: #34495e;
    padding: 15px;
    border-radius: 8px;
    min-width: 250px;
    text-align: left;
    border: 1px solid #2c3e50;
}

.team-member p {
    margin: 5px 0;
    color: #ecf0f1;
    font-size: 0.9rem;
}

.team-member a {
    color: #3498db;
    text-decoration: none;
}

.team-member a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        text-align: center;
        border-bottom: 1px solid #2c3e50;
    }
    
    .result-links {
        flex-direction: column;
        align-items: center;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .page-header h2 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .year-tabs {
        gap: 3px;
    }
    
    .year-tab {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .page-header h2 {
        font-size: 1.8rem;
    }
    
    .content-section h3 {
        font-size: 1.5rem;
    }
    
    .results-table {
        font-size: 0.9rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 6px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Animation for smooth transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeIn 0.6s ease-out;
}

/* Custom scrollbar for table */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Additional Page Styles */
.age-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.age-group {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.age-group h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.prizes-list {
    list-style: none;
    padding: 0;
}

.prizes-list li {
    background: #f8f9fa;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.rounds-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.round {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-top: 4px solid #667eea;
}

.timeline-item {
    display: flex;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-date {
    background: #667eea;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    margin-right: 20px;
    min-width: 150px;
    text-align: center;
}

.timeline-content h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.step {
    display: flex;
    align-items: flex-start;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.step-number {
    background: #667eea;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.problem-types, .problem-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.problem-type, .problem-category {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.guidelines ul {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.resource-links, .support-links, .login-links, .quick-links, .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.resource-link, .support-link, .login-link, .quick-link, .social-link {
    background: #667eea;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.resource-link:hover, .support-link:hover, .login-link:hover, .quick-link:hover, .social-link:hover {
    background: #5a6fd8;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.team-member {
    background: #34495e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    color: #ecf0f1;
}

.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .header-title {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .header-title h1 {
        font-size: 1.2rem;
    }
    
    .team-members {
        flex-direction: column;
        align-items: center;
    }
    
    .team-member {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-date {
        margin-right: 0;
        margin-bottom: 15px;
        min-width: auto;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 15px;
    }
}
