/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff006e;
    --dark-bg: #0a0e27;
    --darker-bg: #050814;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --card-bg: rgba(0, 212, 255, 0.1);
    --border-color: rgba(0, 212, 255, 0.3);
    --glow-color: rgba(0, 212, 255, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--darker-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 100px 20px 50px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.hero-image-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 30px var(--glow-color);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.hero-image[src] {
    display: block;
}

.hero-image[src] ~ .image-placeholder {
    display: none;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-line {
    display: block;
    animation: slideIn 1s ease-out;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

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

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    animation: fadeIn 1s ease-out 0.4s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-scroll {
    margin-top: 60px;
    animation: fadeIn 1s ease-out 0.6s both;
}

.scroll-arrow {
    font-size: 2rem;
    animation: bounce 2s infinite;
    margin-top: 10px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* About Section */
.about {
    padding: 100px 20px;
    background: var(--dark-bg);
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.about-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(30px);
}

.about-card[data-animate="true"] {
    opacity: 1;
    transform: translateY(0);
    animation: cardSlideIn 0.6s ease-out;
}

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

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--glow-color);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.about-card p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* Game Section */
.game-section {
    padding: 100px 20px;
    background: var(--darker-bg);
}

.game-description {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#gameCanvas {
    width: 100%;
    height: 400px;
    background: #000;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    display: block;
    box-shadow: 0 0 20px var(--glow-color);
    touch-action: none;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
}

.overlay-btn {
    pointer-events: auto;
    z-index: 10;
}

.shoot-btn.overlay-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: auto;
    min-width: 70px;
    padding: 15px 18px;
    font-size: 1.5rem;
    border-radius: 50%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(255, 0, 110, 0.5);
}

.game-btn.overlay-btn {
    background: var(--primary-color);
    border: none;
    color: var(--darker-bg);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    touch-action: manipulation;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.game-btn.overlay-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--glow-color);
}

.game-btn.overlay-btn:active {
    transform: translateY(0);
}

.btn-label {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Leaderboard */
.leaderboard-container {
    margin-top: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.leaderboard-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leaderboard-list {
    min-height: 100px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s;
}

.leaderboard-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    border-color: rgba(255, 215, 0, 0.5);
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.05));
    border-color: rgba(192, 192, 192, 0.5);
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.05));
    border-color: rgba(205, 127, 50, 0.5);
}

.leaderboard-rank {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
    min-width: 30px;
}

.leaderboard-rank.rank-1 {
    color: #ffd700;
}

.leaderboard-rank.rank-2 {
    color: #c0c0c0;
}

.leaderboard-rank.rank-3 {
    color: #cd7f32;
}

.leaderboard-score {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.leaderboard-date {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.no-scores {
    text-align: center;
    color: var(--text-gray);
    font-style: italic;
    padding: 20px;
}

/* Footer */
.footer {
    padding: 40px 20px;
    text-align: center;
    background: var(--dark-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-gray);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 39, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-image-container {
        width: 150px;
        height: 150px;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    #gameCanvas {
        height: 300px;
    }

    .shoot-btn.overlay-btn {
        bottom: 15px;
        right: 15px;
        min-width: 65px;
        padding: 12px 15px;
        font-size: 1.4rem;
    }

    .game-btn.overlay-btn {
        font-size: 1rem;
        padding: 12px 25px;
    }
}

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

    .game-stats {
        flex-direction: column;
        gap: 15px;
    }

    #gameCanvas {
        height: 250px;
    }

    .shoot-btn.overlay-btn {
        bottom: 10px;
        right: 10px;
        min-width: 60px;
        padding: 10px 14px;
        font-size: 1.2rem;
    }
    
    .btn-label {
        font-size: 0.65rem;
    }

    .game-btn.overlay-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

