:root {
    --primary-color: #1a73e8;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --hover-color: #f1f3f4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #1a237e;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.update-date {
    font-size: 1em;
    opacity: 0.8;
    font-style: italic;
}

.controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    padding-left: 40px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #1a237e;
    outline: none;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filters select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    background-color: white;
    cursor: pointer;
    min-width: 200px;
}

.filters select:focus {
    border-color: #1a237e;
    outline: none;
}

.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    table-layout: fixed;
}

tr {
    height: 45px;
}

td, th {
    padding: 0 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #1a237e;
    position: sticky;
    top: 0;
    z-index: 1;
}

th:nth-child(1) { width: 8%; }  /* Позиция */
th:nth-child(2) { width: 40%; } /* Страна */
th:nth-child(3) { width: 15%; } /* Очки */
th:nth-child(4) { width: 20%; } /* Конфедерация */
th:nth-child(5) { width: 17%; } /* Изменение */

.country-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.country-cell img {
    width: 20px;
    height: 15px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 2px;
}

.country-cell span {
    display: inline-block;
    vertical-align: middle;
    line-height: 50px;
}

.position-change {
    display: table-sell;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.position-up {
    color: #198754;
}

.position-down {
    color: #dc3545;
}

.position-same {
    color: #6c757d;
}

.position-up::before {
    content: "↑";
    margin-right: 2px;
}

.position-down::before {
    content: "↓";
    margin-right: 2px;
}

.position-same::before {
    content: "→";
    margin-right: 2px;
}

footer {
    background-color: #1a237e;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid #dee2e6;
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }
    
    .search-box, .filters select {
        width: 100%;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 0.9em;
    }
}

.error {
    color: #f44336;
    text-align: center;
    padding: 20px;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

tbody tr {
    animation: fadeIn 0.3s ease-in-out;
}

/* Стилизация скроллбара */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

.table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.explanation {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.explanation h2 {
    color: #0d6efd;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.explanation p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.explanation ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.explanation li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.explanation strong {
    color: #0d6efd;
}

tr:hover {
    background-color: #f5f5f5;
}

/* Custom styles for header */
.header-wrapper {
    margin-bottom: 3rem;
}

.header-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.header-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at center, rgba(13, 110, 253, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.fifa-logo-wrapper {
    flex-shrink: 0;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.fifa-logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header-text {
    flex: 1;
    text-align: center;
}

.header-text h1 {
    font-family: 'Montserrat', sans-serif;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.header-text .lead {
    font-family: 'Roboto', sans-serif;
    color: #6c757d;
    font-size: 1.2rem;
    margin-bottom: 0;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.header-stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item i {
    font-size: 2rem;
    color: #0d6efd;
    margin-bottom: 0.5rem;
}

.stat-number {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.stat-label {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.update-info {
    text-align: center;
    position: relative;
    z-index: 1;
}

.update-info .badge {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.update-info .badge i {
    font-size: 1.1rem;
}

/* Custom styles for FIFA rankings table */
.header-subtitle {
    margin-top: 1rem;
}

.update-info {
    margin-top: 1rem;
}

.update-info .badge {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.1);
} 