

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%;
    min-height: 100vh;
    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;
    position: relative;
}

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


.bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #ff5722, #ff8a65);
    top: -200px;
    left: -200px;
    
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #2196f3, #64b5f6);
    top: 30%;
    right: -150px;
    
}

.circle-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #4caf50, #81c784);
    bottom: -100px;
    left: 50%;
    
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}


.start-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 25px;
}


.title-section {
    text-align: center;
    margin-bottom: 3rem;
    
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mode-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 87, 34, 0.2);
    border: 1px solid rgba(255, 87, 34, 0.5);
    border-radius: 50px;
    color: #ff8a65;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.start-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-icon {
    font-size: 3rem;
    
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.start-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.difficulty-selector {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    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);
}

.play-button svg {
    margin-left: 0.5rem;
}

.back-btn-start {
    padding: 0.75rem 2rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn-start:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}


.start-leaderboard {
    width: 100%;
    max-width: 800px;
    margin-top: 4rem;
}

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

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

.leaderboard-tab {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.leaderboard-tab:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
}

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

.leaderboard-table {
    background: rgba(13, 34, 56, 0.4);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 400px;
    overflow-y: 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;
}


.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%;
    height: calc(100vh - 200px);
    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%;
    background: linear-gradient(180deg, #0a1929 0%, #0d2238 100%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

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


.current-result-container {
    width: 100%;
    max-width: 900px;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

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

.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;
    letter-spacing: 1px;
}

.current-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff5722;
}


.history-container {
    width: 100%;
    max-width: 900px;
    margin-bottom: 2rem;
}

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


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

.tab-button {
    padding: 0.75rem 2rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.tab-button:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
}

.tab-button.active {
    background: transparent;
    border-color: #ff5722;
    color: #ff5722;
}


.results-table {
    width: 100%;
    margin-bottom: 2rem;
    background: rgba(13, 34, 56, 0.4);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

thead {
    background: rgba(13, 34, 56, 0.8);
}

th {
    padding: 1rem;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th:first-child {
    width: 60px;
    text-align: center;
}

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

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

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

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

tbody tr.highlight-result td {
    color: white;
    font-weight: 500;
}

tbody tr.highlight-result td:first-child {
    background: #ff5722;
    color: white;
}


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

.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #2196f3;
    color: white;
}

.btn-primary:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}


.click-effect {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    
}

@keyframes clickRipple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}


@media (max-width: 768px) {
    .game-stats {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

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

    .lives {
        width: 100%;
        justify-content: center;
    }

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

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

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

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

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

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

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

    .difficulty-tabs {
        flex-wrap: wrap;
    }

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

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

    .warning-icon{
        display: none;
    }
    .start-screen{
        padding: 15px;
    }
}

