* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28102, 126, 234, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo-target {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    background: white;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
    border: 3px solid #667eea;
}

.logo-target::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
}

.logo-target::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand.logo {
    margin-right: 0;
}

.nav-link {
    color: #333 !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 20px;
    margin: 0 0.25rem;
}

.nav-link:hover {
    background: linear-gradient(45deg, #667eea, #764ba2) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    padding: 1rem 0;
}

/* Game Section */
.game-section {
    margin-bottom: 2rem;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.game-header h1 {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem !important;
}

.game-header .game-description {
    font-size: 1rem;
}

.game-description {
    color: #666;
}

.game-controls {
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa !important;
    color: #333 !important;
    border: 2px solid #e9ecef !important;
}

.btn-secondary:hover {
    background: #e9ecef !important;
    transform: translateY(-2px);
    color: #333 !important;
}

.score-display,
.timer-display,
.accuracy-display {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
}

.canvas-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

#gameCanvas {
    border: 3px solid #e9ecef;
    border-radius: 15px;
    background: #fff;
    cursor: crosshair;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    width: 600px;
    height: 450px;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 450px;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 2rem;
}

.overlay-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.overlay-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Game Stats */
.game-stats {
    margin-top: 2rem;
}



.stat-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* Target Styles */
.target {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.1s ease;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #ee5a24);
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
    animation: targetAppear 0.3s ease-out;
}

.target::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 40%;
    background: #fff;
    border-radius: 50%;
}

.target::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15%;
    height: 15%;
    background: #ff6b6b;
    border-radius: 50%;
}

.target:hover {
    transform: scale(1.1);
}

@keyframes targetAppear {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.target-hit {
    animation: targetHit 0.3s ease-out forwards;
}

@keyframes targetHit {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        background: #51cf66;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.target-miss {
    animation: targetMiss 1s ease-out forwards;
}

@keyframes targetMiss {
    0% {
        opacity: 1;
        background: radial-gradient(circle at 30% 30%, #ff6b6b, #ee5a24);
    }

    100% {
        opacity: 0;
        background: radial-gradient(circle at 30% 30%, #868e96, #495057);
        transform: scale(0.8);
    }
}

/* Info Sections */
.info-section,
.leaderboard-section {
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.info-container,
.leaderboard-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.instruction-item {
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.instruction-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.instruction-item h4 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.instruction-item p {
    color: #666;
    line-height: 1.6;
}

/* Leaderboard */
.leaderboard-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 2fr;
    gap: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leaderboard-list {
    max-height: 300px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 2fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.leaderboard-entry:hover {
    background-color: #f8f9fa;
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.rank-col {
    font-weight: 600;
    color: #667eea;
}

/* Modal Styles */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 20px 20px 0 0;
}

.modal-title {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.game-over-content {
    padding: 1rem;
}

.final-score {
    margin-bottom: 2rem;
}

.final-score h2 {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
}

.performance-breakdown {
    margin-bottom: 2rem;
}

.performance-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.performance-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.performance-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.performance-rating h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.performance-rating p {
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    #gameCanvas {
        width: 100%;
        max-width: 400px;
        height: 300px;
    }

    .game-container {
        padding: 1rem;
    }

    .game-header h1 {
        font-size: 2rem !important;
    }

    .game-controls {
        justify-content: center;
        text-align: center;
    }

    .game-controls>* {
        margin: 0.25rem;
    }

    .leaderboard-header,
    .leaderboard-entry {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        font-size: 0.8rem;
    }

    .instruction-item {
        padding: 1rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }
}