/* Загальні скидання */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
    background: #1a1c23;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ========= БЛОК ВХОДУ ========= */
#auth {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
background: linear-gradient(145deg, #1e2128, #13151a);
}

.auth-box {
    background: #2a2d37;
    padding: 50px 40px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    border: 1px solid #3e424f;
    max-width: 400px;
    width: 100%;
}

.auth-box h2 {
    color: #f5d742;
    font-size: 28px;
    margin: 10px 0;
}

.auth-box p {
    color: #aab;
    margin-bottom: 30px;
}

#loginGoogle {
background: #4285F4;
color: white;
border: none;
padding: 14px 30px;
border-radius: 50px;
font-size: 18px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
width: 100%;
}

#loginGoogle i {
margin-right: 10px;
}

#loginGoogle:hover {
background: #5a95f5;
transform: scale(1.02);
box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
}

/* ========= ДАШБОРД ========= */
#dashboard {
width: 100%;
max-width: 1300px;
margin: 20px auto;
padding: 0 20px;
display: block;
}

/* Верхній бар */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #262a33;
    padding: 12px 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    border-bottom: 3px solid #f5d742;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #f5d742;
    letter-spacing: 1px;
}

.logo i {
    margin-right: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.user-info span {
    font-size: 16px;
}

.server-badge {
    background: #3e424f;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 13px;
    color: #aab;
}

.logout-btn {
    background: #b13e3e;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.logout-btn:hover {
    background: #d44;
    transform: scale(1.03);
}

/* Сітка статистики */
.stats-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #262a33;
    border-radius: 16px;
    padding: 20px 25px;
    border: 1px solid #353a46;
    transition: 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.card:hover {
    border-color: #f5d742;
    transform: translateY(-2px);
}

/* Картка профілю */
.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar img {
    border-radius: 50%;
    border: 3px solid #f5d742;
}

.profile-info h2 {
    font-size: 24px;
    color: #fff;
}

.profile-info .alliance {
    color: #f5d742;
    font-weight: 600;
    margin: 5px 0;
}

.profile-info .server {
    color: #889;
    font-size: 14px;
}

/* Картки статистики (цифри) */
.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.icon-stat {
    font-size: 28px;
    color: #f5d742;
    margin-bottom: 5px;
}

.stat-item h3 {
    font-size: 32px;
    color: #fff;
    font-weight: 700;
}

.stat-item p {
    color: #889;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ресурси */
.resources-card {
    padding: 25px;
}

.resources-card h3 {
    margin-bottom: 20px;
    color: #f5d742;
}

.resource-item {
    display: grid;
    grid-template-columns: 120px 1fr 120px 80px;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #2f3440;
}

.res-label {
    font-weight: 600;
    font-size: 15px;
}
.res-label i {
    margin-right: 8px;
    width: 20px;
}

.progress-bar {
    height: 12px;
    background: #1e2128;
    border-radius: 30px;
    overflow: hidden;
    width: 100%;
}

.progress-bar div {
    height: 100%;
    border-radius: 30px;
    transition: width 0.5s ease;
}

.res-values {
    font-size: 15px;
    font-weight: 600;
    color: #ddd;
}

.res-prod {
    font-size: 14px;
    color: #7ccf7c;
    text-align: right;
}

/* Таблиця сіл */
.villages-card {
    padding: 25px;
    overflow-x: auto;
}

.villages-card h3 {
    margin-bottom: 20px;
    color: #f5d742;
}

.villages-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.villages-table th {
    text-align: left;
    padding: 12px 15px;
    background: #1e2128;
    color: #aab;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
}

.villages-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #2f3440;
}

.villages-table tbody tr:hover {
    background: #2f3440;
    border-radius: 8px;
}

.village-btn {
    background: #3e424f;
    border: none;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}

.village-btn:hover {
    background: #f5d742;
    color: #1a1c23;
    font-weight: 600;
}

/* Координати - стиль */
.coords {
    background: #1e2128;
    padding: 3px 12px;
    border-radius: 30px;
    font-family: monospace;
    font-size: 14px;
    color: #f5d742;
}

/* Адаптивність */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .profile-card {
        grid-column: span 2;
    }
    .resource-item {
        grid-template-columns: 100px 1fr 80px 60px;
        gap: 10px;
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .top-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .user-info {
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .profile-card {
        grid-column: span 1;
        flex-direction: column;
        text-align: center;
    }
    .resource-item {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: center;
    }
    .res-prod {
        text-align: center;
    }
}
.server-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1e2128;
    padding: 5px 15px 5px 10px;
    border-radius: 30px;
    border: 1px solid #3e424f;
}

.server-select-wrapper i {
    color: #f5d742;
}

#serverSelect {
background: transparent;
color: #e0e0e0;
border: none;
font-size: 14px;
font-weight: 600;
outline: none;
cursor: pointer;
}

#serverSelect option {
background: #262a33;
color: #e0e0e0;
}

#customServerInput {
background: #1e2128;
color: #fff;
border: 1px solid #3e424f;
border-radius: 20px;
padding: 4px 12px;
font-size: 14px;
width: 130px;
outline: none;
}

#customServerInput:focus {
border-color: #f5d742;
}
.player-name-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1e2128;
    padding: 4px 12px 4px 10px;
    border-radius: 30px;
    border: 1px solid #3e424f;
}
.player-name-wrapper i {
    color: #f5d742;
}
#playerNameInput {
background: transparent;
border: none;
color: #e0e0e0;
outline: none;
font-size: 14px;
width: 130px;
}
#playerNameInput::placeholder {
color: #666;
}
