* {
    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-circle {
    width: 40px;
    height: 40px;
    border: 3px solid #667eea;
    border-radius: 50%;
    margin-right: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

@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: 2rem 0;
}

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

.game-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);
}

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

.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 {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.canvas-container {
    position: relative;
}

#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%;
    height: auto;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

.canvas-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.start-message {
    text-align: center;
    color: #333;
    padding: 1rem;
}

.start-message h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

@media (max-width: 768px) {
    .canvas-overlay {
        width: 350px;
        height: 350px;
    }
}

.stat-item {
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}



/* Leaderboard Section */
.leaderboard-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

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

.leaderboard-table {
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.leaderboard-table th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.leaderboard-table tbody tr:hover {
    background: #f8f9fa;
}

.leaderboard-table tbody tr:first-child td:first-child {
    color: #ffd700;
    font-weight: 700;
    font-size: 1.2rem;
}

.leaderboard-table tbody tr:nth-child(2) td:first-child {
    color: #c0c0c0;
    font-weight: 700;
}

.leaderboard-table tbody tr:nth-child(3) td:first-child {
    color: #cd7f32;
    font-weight: 700;
}

/* How to Play Section */
.how-to-play-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.how-to-play-section h2 {
    font-size: 2rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instruction-item {
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s ease;
    min-height: 200px;
}

.instruction-item:hover {
    transform: translateY(-5px);
}

.instruction-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.instruction-text h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.instruction-text p {
    color: #666;
    margin-bottom: 0;
}

/* Stat Cards (Quick Target Style) */
.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;
}

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

.info-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-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);
}

.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 1fr 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 1fr 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;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.1);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Additional Mobile Optimizations */
@media (max-width: 480px) {
    .game-container {
        padding: 1rem;
    }

    .leaderboard-table {
        font-size: 0.9rem;
    }

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

    .instruction-item {
        min-height: auto;
        padding: 1rem;
    }

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