

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #0a1929 0%, #0d2238 100%);
    min-height: 100vh;
    color: white;
    
}


.start-screen {
    
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 1001;
    background: linear-gradient(180deg, #0a1929 0%, #0d2238 100%);
    overflow-y: auto;
    padding: 3rem 2rem;
}

.start-screen.hidden {
    display: none;
}

.start-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    margin-top: 2rem;
    color: white;
}


.difficulty-selector {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.difficulty-btn {
    padding: 1.2rem 3rem;
    background: rgba(13, 34, 56, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
    min-width: 140px;
}

.difficulty-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.difficulty-btn.active {
    background: #ff5722;
    border-color: #ff5722;
    color: white;
    box-shadow: 0 6px 24px rgba(255, 87, 34, 0.5);
}


.play-button {
    padding: 1.5rem 6rem;
    background: linear-gradient(135deg, #ff6b3d 0%, #ff5722 100%);
    border: none;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(255, 87, 34, 0.4);
    margin-bottom: 1.5rem;
}

.play-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 87, 34, 0.6);
}

.play-button:active {
    transform: translateY(-1px);
}


.back-btn-start {
    padding: 1rem 2rem;
    background: rgba(13, 34, 56, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.back-btn-start:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}


.start-leaderboard {
    width: 100%;
    max-width: 900px;
    background: rgba(13, 34, 56, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

.leaderboard-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
}

.leaderboard-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.leaderboard-tab {
    padding: 0.8rem 2rem;
    background: rgba(13, 34, 56, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    min-width: 100px;
}

.leaderboard-tab:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.leaderboard-tab.active {
    background: #ff5722;
    border-color: #ff5722;
    color: white;
}

.leaderboard-table {
    overflow-x: auto;
}

.leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table thead {
    background: rgba(13, 34, 56, 0.8);
    position: sticky;
    top: 0;
    z-index: 1;
}

.leaderboard-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table th:first-child {
    width: 50px;
    text-align: center;
}

.leaderboard-table td {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-table td:first-child {
    text-align: center;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
}

.leaderboard-table tbody tr:hover {
    background: rgba(33, 150, 243, 0.08);
}


.leaderboard-table::-webkit-scrollbar {
    width: 8px;
}

.leaderboard-table::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.leaderboard-table::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.leaderboard-table::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}


.mode-description {
    width: 100%;
    max-width: 900px;
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(13, 34, 56, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.mode-desc-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
}

.mode-desc-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mode-desc-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(13, 34, 56, 0.3);
    border-radius: 12px;
    transition: all 0.3s;
}

.mode-desc-item:hover {
    background: rgba(13, 34, 56, 0.5);
    transform: translateX(5px);
}

.mode-desc-icon {
    flex-shrink: 0;
}

.mode-desc-icon img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
}

.mode-desc-text {
    flex: 1;
}

.mode-desc-text h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.mode-desc-text p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}


.game-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    background: rgba(10, 25, 41, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.back-button {
    position: absolute;
    left: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2196f3;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.back-button:hover {
    background: #1976d2;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.6);
}

.back-button svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.game-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
}


.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    background: rgba(10, 25, 41, 0.8);
}

.stat-item {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.stat-label {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
}

.stat-value.time {
    color: #ff9800;
}

.stat-value.hits {
    color: #ff5722;
}

.stat-value.speed {
    color: #ff5722;
}

.stat-value.accuracy {
    color: #ff5722;
}


.lives {
    display: flex;
    gap: 0.5rem;
}

.heart {
    width: 32px;
    height: 32px;
    background: #ff5722;
    position: relative;
    transform: rotate(-45deg);
    box-shadow: 0 0 12px rgba(255, 87, 34, 0.6);
}

.heart::before,
.heart::after {
    content: '';
    width: 32px;
    height: 32px;
    background: #ff5722;
    border-radius: 50%;
    position: absolute;
}

.heart::before {
    top: -16px;
    left: 0;
}

.heart::after {
    top: 0;
    left: 16px;
}

.heart.lost {
    background: rgba(255, 87, 34, 0.2);
    box-shadow: none;
}

.heart.lost::before,
.heart.lost::after {
    background: rgba(255, 87, 34, 0.2);
}


.game-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem;
}

#gameCanvas {
    background: linear-gradient(135deg, #1a3a52 0%, #0f2537 100%);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    cursor: crosshair;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 100%;
    max-height: calc(100vh - 280px);
}

.game-hint {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}


.results-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 1000;
    background: linear-gradient(180deg, #0a1929 0%, #0d2238 100%);
    overflow-y: auto;
    padding: 3rem 2rem;
}

.results-screen.active {
    display: flex;
}


.current-result-container {
    width: 100%;
    max-width: 700px;
    background: rgba(13, 34, 56, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.current-result-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
}

.current-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    background: rgba(13, 34, 56, 0.6);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.current-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.current-stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    font-weight: 500;
}

.current-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: #ff5722;
}


.history-container {
    width: 100%;
    max-width: 900px;
    background: rgba(13, 34, 56, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.history-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
}

.results-table {
    overflow-x: auto;
}

.results-table table {
    width: 100%;
    border-collapse: collapse;
}

.results-table thead {
    background: rgba(13, 34, 56, 0.8);
    position: sticky;
    top: 0;
    z-index: 1;
}

.results-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-table th:first-child {
    width: 50px;
    text-align: center;
}

.results-table td {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.results-table td:first-child {
    text-align: center;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
}

.results-table tbody tr:hover {
    background: rgba(33, 150, 243, 0.08);
}

.results-table tbody tr.highlight-result {
    background: rgba(255, 87, 34, 0.15);
}


.results-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b3d 0%, #ff5722 100%);
    border: none;
    color: white;
    box-shadow: 0 6px 24px rgba(255, 87, 34, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 87, 34, 0.6);
}

.btn-secondary {
    background: rgba(13, 34, 56, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}


@media (max-width: 768px) {
    .start-title {
        font-size: 2rem;
        margin-top: 1rem;
    }

    .difficulty-selector {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        gap: 1rem;
    }

    .difficulty-btn {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    .play-button {
        font-size: 1.5rem;
        padding: 1.2rem 4rem;
    }

    .back-button {
        left: 1rem;
    }

    .game-stats {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem 2rem;
        justify-content: center;
    }

    .stat-label {
        font-size: 1rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .heart {
        width: 28px;
        height: 28px;
    }

    .heart::before,
    .heart::after {
        width: 28px;
        height: 28px;
    }

    .heart::before {
        top: -14px;
    }

    .heart::after {
        left: 14px;
    }

    .game-container {
        padding: 1rem;
    }

    #gameCanvas {
        max-height: calc(100vh - 300px);
    }

    .game-hint {
        font-size: 0.9rem;
        margin-top: 1rem;
    }

    .current-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .current-stat-value {
        font-size: 2rem;
    }

    .results-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .leaderboard-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .leaderboard-tab {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .start-title {
        font-size: 1.8rem;
    }

    .game-title {
        font-size: 1.3rem;
    }

    .back-button {
        width: 40px;
        height: 40px;
        left: 0.5rem;
    }

    .back-button svg {
        width: 20px;
        height: 20px;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .stat-value {
        font-size: 0.9rem;
    }

    .heart {
        width: 24px;
        height: 24px;
    }

    .heart::before,
    .heart::after {
        width: 24px;
        height: 24px;
    }

    .heart::before {
        top: -12px;
    }

    .heart::after {
        left: 12px;
    }

    .game-container {
        padding: 0.5rem;
    }

    #gameCanvas {
        max-height: calc(100vh - 320px);
    }

    .game-hint {
        font-size: 0.8rem;
    }

    .current-result-title,
    .history-title {
        font-size: 1.5rem;
    }

    .current-stat-value {
        font-size: 1.5rem;
    }
}

