html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* Onemogućava nepotreban skrol */
    background: #1a1a1a;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    user-select: none;
    box-sizing: border-box;
    /* Custom čekić kursor samo za desktop */
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24"><text y="20" font-size="22">🔨</text></svg>') 0 0, auto;
}

body:active {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24"><text y="20" font-size="22">💥</text></svg>') 0 0, auto;
}

*, *:before, *:after {
    box-sizing: inherit;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    padding: 20px;
    text-align: center;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 2.5rem;
    margin: 0 0 5px 0;
    color: #f39c12;
    text-shadow: 2px 2px #000;
}

p {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
}

.subtitle {
    font-size: 1.2rem;
    color: #bdc3c7;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

.rules-box {
    background: rgba(44, 62, 80, 0.7);
    border: 2px solid #34495e;
    border-radius: 12px;
    padding: 18px 25px;
    margin: 10px 0 20px 0;
    max-width: 500px;
    width: 90%;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.rules-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
    color: #f39c12;
    font-size: 1.2rem;
}

.rules-box ul {
    padding-left: 20px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ecf0f1;
}

.rules-box li {
    margin-bottom: 6px;
}

.politicians-grid {
    display: flex;
    gap: 15px;
    margin: 12px 0;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 700px;
}

.politician-card {
    background: #2c3e50;
    border: 3px solid #34495e;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: 0.2s;
    width: 120px;
}

.politician-card:hover {
    border-color: #f39c12;
    transform: translateY(-3px);
}

.politician-card input {
    display: none;
}

.politician-card input:checked + img {
    border: 3px solid #f39c12;
}

.politician-card img {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.politician-card span {
    display: block;
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: bold;
}

button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px #c0392b;
    transition: 0.1s;
    margin-top: 10px;
}

button:hover {
    background: #c0392b;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 0 #c0392b;
}

.menu-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 5px;
    flex-wrap: wrap;
}

 /* Profesionalni stil za gornji desni APK badge */
        .apk-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            background: rgba(39, 174, 96, 0.15);
            color: #2ecc71;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 6px;
            border: 1px solid rgba(46, 204, 113, 0.3);
            transition: all 0.2s ease;
            backdrop-filter: blur(5px);
        }
        .apk-badge:hover {
            background: rgba(39, 174, 96, 0.25);
            border-color: rgba(46, 204, 113, 0.5);
            transform: translateY(-1px);
        }
        .apk-badge svg {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }

.menu-actions button {
    flex: 1; /* Omogućava da oba dugmeta ravnomjerno podijele prostor */
    min-width: 160px; /* Minimalna širina da tekst lijepo stane */
}

.secondary-btn {
    background: #34495e;
    box-shadow: 0 3px #2c3e50;
}
.secondary-btn:hover {
    background: #2c3e50;
}

/* Modal za tabelu i unose */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: #2c3e50;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    border: 2px solid #f39c12;
    text-align: center;
}

.modal-content h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #f39c12;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: none;
    margin: 10px 0 15px 0;
    text-align: center;
}

.leaderboard-table-wrapper {
    max-height: 45vh;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 15px;
    border-radius: 6px;
    /* Sakriva scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.leaderboard-table-wrapper::-webkit-scrollbar {
    display: none;
}

#scores-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#scores-table th,
#scores-table td {
    padding: 8px;
    border-bottom: 1px solid #444;
    text-align: left;
}

#scores-table th {
    color: #f39c12;
    background: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* HUD (Bodovi i Vrijeme) */
.hud {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 550px;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 18px;
    background: #2c3e50;
    padding: 12px;
    border-radius: 8px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

#target-indicator span {
    color: #e74c3c;
}

/* Mreža rupa */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 160px);
    grid-gap: 20px;
    justify-content: center;
}

.hole {
    width: 160px;
    height: 160px;
    background: #2c2c2c;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 5px solid #444;
    box-shadow: inset 0 10px 15px rgba(0,0,0,0.8);
}

.mole {
    position: absolute;
    top: 160px;
    left: 0;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    transition: top 0.15s ease-in-out;
    cursor: pointer;
}

.hole.up .mole {
    top: 0;
}

@media (max-height: 700px), (max-width: 550px) {
    h1 {
        font-size: 1.6rem;
    }
    .subtitle {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    .rules-box {
        padding: 10px 15px;
        margin: 5px 0 10px 0;
        font-size: 0.85rem;
    }
    .rules-box h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    .politician-card {
        width: 90px;
        padding: 6px;
    }
    .politician-card img {
        width: 60px;
        height: 60px;
    }
    .politician-card span {
        font-size: 0.75rem;
    }
    .grid {
        grid-template-columns: repeat(3, 120px);
        grid-gap: 12px;
    }
    .hole {
        width: 120px;
        height: 120px;
        border-width: 4px;
    }
    .mole {
        top: 120px;
        width: 120px;
        height: 120px;
    }
    .hud {
        max-width: 400px;
        font-size: 1.1rem;
        padding: 8px;
    }
}