/* Fonts */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: local('Quicksand Light'), local('Quicksand-Light');
}

@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Quicksand Regular'), local('Quicksand-Regular');
}

@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: local('Quicksand Medium'), local('Quicksand-Medium');
}

@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: local('Quicksand SemiBold'), local('Quicksand-SemiBold');
}

@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local('Quicksand Bold'), local('Quicksand-Bold');
}

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

:root {
    --pastel-pink: #ffd6e8;
    --pastel-purple: #e8d5ff;
    --pastel-blue: #d6e5ff;
    --pastel-mint: #d6fff0;
    --pastel-peach: #ffe8d6;
    --pastel-yellow: #fff9d6;
    --soft-white: #fefefe;
    --soft-gray: #f8f9fa;
    --text-dark: #4a5568;
    --text-medium: #718096;
    --text-light: #a0aec0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Parallax Background */
.parallax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    width: 110%;
    height: 110%;
}

.layer-1 {
    background: linear-gradient(135deg,
    var(--pastel-pink) 0%,
    var(--pastel-purple) 25%,
    var(--pastel-blue) 50%,
    var(--pastel-mint) 75%,
    var(--pastel-peach) 100%);
    opacity: 0.3;
    animation: floatLayer 30s ease-in-out infinite;
}

.layer-2 {
    background: radial-gradient(circle at 30% 50%, rgba(255, 214, 232, 0.3), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(232, 213, 255, 0.3), transparent 50%);
    animation: floatLayer 25s ease-in-out infinite reverse;
}

@keyframes floatLayer {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }
    33% {
        transform: translateY(-15px) translateX(8px) scale(1.01);
    }
    66% {
        transform: translateY(15px) translateX(-8px) scale(0.99);
    }
}

/* Animated particles */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    15% {
        opacity: 0.8;
    }
    85% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) translateX(80px);
        opacity: 0;
    }
}

/* Navigation with blur effect */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 40px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled {
    padding: 12px 40px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    animation: logoWiggle 2s ease-in-out infinite;
}

@keyframes logoWiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

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

.nav-links a {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-dark);
}

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

/* Game Button */
.game-nav-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: gameBtnPulse 2s infinite;
}

@keyframes gameBtnPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 87, 108, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(245, 87, 108, 0);
    }
}

.game-nav-btn:hover {
    transform: scale(1.05);
}

/* Hero Section with Advanced Animations */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    animation: heroEntry 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heroEntry {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -2px;
    animation: titleGlow 3s ease-in-out infinite;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    z-index: 1000;
    position: relative;
}

@keyframes titleGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-medium);
    margin-bottom: 50px;
    font-weight: 400;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    z-index: 1000;
    position: relative;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* Advanced Spaceship Animation */
.spaceship-container {
    margin: 60px auto;
    position: relative;
    width: 350px;
    height: 350px;
    pointer-events: none;
    user-select: none;
}

.spaceship {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    position: relative;
    animation: complexFloat 8s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}

@keyframes complexFloat {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(-3deg) scale(1);
    }
    25% {
        transform: translateY(-30px) translateX(20px) rotate(2deg) scale(1.05);
    }
    50% {
        transform: translateY(-20px) translateX(-20px) rotate(-2deg) scale(0.95);
    }
    75% {
        transform: translateY(10px) translateX(10px) rotate(3deg) scale(1.02);
    }
}

.ship-glass {
    width: 220px;
    height: 220px;
    background-color: #ffaf37;
    background-image: url('../assets/images/sun.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 rgba(255, 140, 0, 0.1),
    0 20px 80px rgba(255, 69, 0, 0.1),
    inset 0 -10px 50px rgba(255, 69, 0, 0.1),
    inset 0 10px 50px rgba(255, 223, 120, 0.1);
    animation: pulse 3s infinite linear;
    overflow: hidden;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 40px 80px rgba(255, 140, 0, 0.6),
        0 20px 40px rgba(255, 69, 0, 0.4),
        inset 0 -10px 30px rgba(255, 69, 0, 0.8),
        inset 0 5px 20px rgba(255, 223, 120, 0.8);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 50px 100px rgba(255, 140, 0, 0.8),
        0 30px 50px rgba(255, 69, 0, 0.6),
        inset 0 -15px 40px rgba(255, 69, 0, 1),
        inset 0 10px 25px rgba(255, 223, 120, 1);
        transform: scale(1.08);
    }
}

.ship-glass::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 20px;
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.2));
    border-radius: 50%;
    filter: blur(15px);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(30px) translateY(-10px);
    }
}

.orbit-ring {
    position: absolute;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbitRotate 60s linear infinite;
    pointer-events: none;
    user-select: none;
}

@keyframes orbitRotate {
    from {
        transform: translate(-50%, -50%) rotateZ(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotateZ(360deg);
    }
}

.orbit-planet {
    position: absolute;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%) rotateZ(180deg);
    animation: planetRotate 60s linear infinite, planetPulse 4s ease-in-out infinite;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.1),
    0 15px 50px rgba(0, 0, 0, 0.4),
    inset -10px -10px 30px rgba(0, 0, 0, 0.3),
    inset 10px 10px 30px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.3), transparent 50%);
}

.orbit-planet::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 10%;
    width: 40%;
    height: 50%;
    background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    filter: blur(8px);
    animation: planetShimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes planetPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(102, 126, 234, 0.2),
        0 10px 40px rgba(102, 126, 234, 0.3),
        inset 0 -5px 25px rgba(102, 126, 234, 0.15),
        inset 0 5px 25px rgba(255, 255, 255, 0.2);
        transform: translateX(-50%) rotateZ(180deg) scale(1);
    }
    50% {
        box-shadow: 0 0 0 rgba(102, 126, 234, 0.4),
        0 15px 50px rgba(102, 126, 234, 0.5),
        inset 0 -8px 30px rgba(102, 126, 234, 0.25),
        inset 0 8px 30px rgba(255, 255, 255, 0.3);
        transform: translateX(-50%) rotateZ(180deg) scale(1.03);
    }
}

@keyframes planetShimmer {
    0%, 100% {
        transform: translateX(0) translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateX(15px) translateY(-5px);
        opacity: 0.8;
    }
}

@keyframes planetRotate {
    from {
        transform: translateX(-50%) rotateZ(0deg) rotate(0deg);
    }
    to {
        transform: translateX(-50%) rotateZ(0deg) rotate(-360deg);
    }
}

/* Individual Planet Orbits */
.orbit-mercury {
    width: 200px;
    height: 200px;
    animation: orbitRotate 8s linear infinite;
    animation-delay: -2s;
}

.orbit-venus {
    width: 320px;
    height: 320px;
    animation: orbitRotate 12s linear infinite;
    animation-delay: -7s;
}

.orbit-earth {
    width: 440px;
    height: 440px;
    animation: orbitRotate 16s linear infinite;
    animation-delay: -5s;
}

.orbit-mars {
    width: 560px;
    height: 560px;
    animation: orbitRotate 24s linear infinite;
    animation-delay: -15s;
}

.orbit-jupiter {
    width: 700px;
    height: 700px;
    animation: orbitRotate 48s linear infinite;
    animation-delay: -30s;
}

.orbit-saturn {
    width: 840px;
    height: 840px;
    animation: orbitRotate 60s linear infinite;
    animation-delay: -22s;
}

.orbit-uranus {
    width: 980px;
    height: 980px;
    animation: orbitRotate 84s linear infinite;
    animation-delay: -60s;
}

.orbit-neptune {
    width: 1120px;
    height: 1120px;
    animation: orbitRotate 120s linear infinite;
    animation-delay: -75s;
}

.orbit-pluto {
    width: 1260px;
    height: 1260px;
    animation: orbitRotate 180s linear infinite;
    animation-delay: -130s;
}

.orbit-pig {
    width: 1400px;
    height: 1400px;
    animation: orbitRotate 200s linear infinite;
    animation-delay: -180s;
}

/* Planet-specific styles */
.planet-mercury {
    animation: planetRotate 8s linear infinite;
    animation-delay: -2s;
    background: radial-gradient(circle at 30% 30%, #c4a373, #8c7853 60%, #5d4e36 100%) !important;
}

.planet-venus {
    animation: planetRotate 12s linear infinite;
    animation-delay: -7s;
    background: radial-gradient(circle at 30% 30%, #ffe066, #ffc649 60%, #cc9a37 100%) !important;
}

.planet-earth {
    animation: planetRotate 16s linear infinite;
    animation-delay: -5s;
    background: radial-gradient(circle at 30% 30%, #8bb3f0, #6b93d6 60%, #4a6ba8 100%) !important;
}

.planet-mars {
    animation: planetRotate 24s linear infinite;
    animation-delay: -15s;
    background: radial-gradient(circle at 30% 30%, #e67e7e, #cd5c5c 60%, #a04747 100%) !important;
}

.planet-jupiter {
    animation: planetRotate 48s linear infinite;
    animation-delay: -30s;
    background: radial-gradient(circle at 30% 30%, #f0e4c4, #d8ca9d 60%, #b8a67d 100%) !important;
}

.planet-saturn {
    animation: planetRotate 60s linear infinite;
    animation-delay: -22s;
    background: radial-gradient(circle at 30% 30%, #fcc49b, #fab27b 60%, #d18a5a 100%) !important;
}

.planet-uranus {
    animation: planetRotate 84s linear infinite;
    animation-delay: -60s;
    background: radial-gradient(circle at 30% 30%, #7fe0f7, #4fd0e7 60%, #3ba8c4 100%) !important;
}

.planet-neptune {
    animation: planetRotate 120s linear infinite;
    animation-delay: -75s;
    background: radial-gradient(circle at 30% 30%, #6b8fff, #4b70dd 60%, #3a56b8 100%) !important;
}

.planet-pluto {
    animation: planetRotate 180s linear infinite;
    animation-delay: -130s;
    background: radial-gradient(circle at 30% 30%, #bcc6d7, #9ca6b7 60%, #7a8394 100%) !important;
}

.planet-pig {
    font-size: 48px;
    animation: planetRotate 200s linear infinite;
    animation-delay: -180s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Interactive Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 45px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-block;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    border: 2px solid transparent;
    background-image: linear-gradient(white, white),
    linear-gradient(135deg, #667eea, #764ba2);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    padding: 16px 43px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 15px;
    display: inline-block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg,
    rgba(102, 126, 234, 0.1),
    rgba(118, 75, 162, 0.1));
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

/* Game Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    animation: modalFadeIn 0.3s ease;
}

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

.game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-canvas {
    width: 90%;
    max-width: 900px;
    height: 600px;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 100;
}

.game-score {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 15px;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.game-health {
    display: flex;
    gap: 5px;
}

.weapon-timer {
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.health-bar {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.health-bar::before {
    content: '❤️';
    filter: drop-shadow(0 0 5px rgba(255, 68, 68, 0.5));
}

.health-bar.lost::before {
    content: '🖤';
    filter: drop-shadow(0 0 5px rgba(128, 128, 128, 0.5));
    animation: healthLost 0.5s ease;
}

@keyframes healthLost {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.game-upgrades {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 100;
}

.upgrade-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upgrade-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(78, 205, 196, 0.4);
}

.upgrade-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-cost {
    font-size: 0.8rem;
    opacity: 0.9;
}

.game-player {
    position: absolute;
    width: 60px;
    height: 60px;
    left: 100px;
    top: 300px;
    font-size: 50px;
    transition: top 0.1s ease;
    z-index: 50;
    transform: rotate(45deg);
}

.player-shield {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid rgba(100, 200, 255, 0.5);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: shieldRotate 2s linear infinite;
    display: none;
}

.player-shield.active {
    display: block;
}

@keyframes shieldRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.game-bullet {
    position: absolute;
    width: 20px;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: bulletFly 1s linear;
    z-index: 10;
}

@keyframes bulletFly {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(1000px);
    }
}

.game-enemy {
    position: absolute;
    width: 50px;
    height: 50px;
    font-size: 40px;
    animation: enemyMove 4s linear;
    z-index: 10;
}

@keyframes enemyMove {
    from {
        right: -60px;
    }
    to {
        right: 110%;
    }
}

.game-explosion {
    position: absolute;
    width: 60px;
    height: 60px;
    font-size: 50px;
    animation: explode 0.5s ease;
    z-index: 1000;
}

@keyframes explode {
    from {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: scale(2) rotate(180deg);
        opacity: 0;
    }
}

.game-powerup {
    position: absolute;
    width: 40px;
    height: 40px;
    font-size: 35px;
    animation: powerupFloat 10s linear;
    z-index: 10;
}

@keyframes powerupFloat {
    from {
        right: -60px;
        transform: translateY(0) rotate(0deg);
    }
    to {
        right: 110%;
        transform: translateY(20px) rotate(360deg);
    }
}

.close-game {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 101;
}

.close-game:hover {
    background: rgba(255, 87, 108, 0.8);
    transform: scale(1.1) rotate(90deg);
}

.game-over-screen {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 200;
}

.game-over-title {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.final-score {
    font-size: 2rem;
    margin-bottom: 30px;
}

.restart-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.5);
}

/* Gallery Grid */
.gallery-section {
    padding: 100px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

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

.section-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--text-medium);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.pinterest-grid {
    columns: 4 300px;
    column-gap: 25px;
    margin: 0 auto;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 25px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    opacity: 0;
    animation: gridItemAppear 0.6s ease forwards;
}

.grid-item:nth-child(1) {
    animation-delay: 0.1s;
}

.grid-item:nth-child(2) {
    animation-delay: 0.2s;
}

.grid-item:nth-child(3) {
    animation-delay: 0.3s;
}

.grid-item:nth-child(4) {
    animation-delay: 0.4s;
}

.grid-item:nth-child(5) {
    animation-delay: 0.5s;
}

.grid-item:nth-child(6) {
    animation-delay: 0.6s;
}

.grid-item:nth-child(7) {
    animation-delay: 0.7s;
}

.grid-item:nth-child(8) {
    animation-delay: 0.8s;
}

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

.grid-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.grid-item-content {
    padding: 25px;
}

.grid-item-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--pastel-pink), var(--pastel-purple));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    pointer-events: none;
    user-select: none;
}

.grid-item:hover .grid-item-icon {
    transform: rotate(10deg) scale(1.1);
}

.grid-item h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 600;
}

.grid-item p {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 1rem;
}


.grid-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--pastel-blue), var(--pastel-mint));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    position: relative;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.grid-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmerRotate 10s linear infinite;
}

@keyframes shimmerRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Launch Section */
.launch-section {
    padding: 120px 20px;
    background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95),
    rgba(232, 213, 255, 0.2));
    border-radius: 50px;
    margin: 100px auto;
    max-width: 1200px;
    text-align: center;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.launch-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    animation: launchBgRotate 30s linear infinite;
}

@keyframes launchBgRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.launch-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 25px 60px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.3);
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.launch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.launch-btn:hover::before {
    left: 100%;
}

.launch-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 40px rgba(245, 87, 108, 0.5);
}

/* Footer */
.footer {
    padding: 80px 20px 40px;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9));
    margin-top: 100px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.social-link {
    width: 55px;
    height: 55px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 24px;
}

.social-link:hover {
    transform: translateY(-5px) rotate(15deg);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--pastel-pink), var(--pastel-purple));
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s infinite;
    cursor: pointer;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(15px);
    }
}

/* Notification Toast */
.notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 20px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: var(--text-dark);
    z-index: 200000;
    transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification.show {
    bottom: 30px;
}

/* Mobile Responsive */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    nav {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

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

    .pinterest-grid {
        columns: 2 150px;
        column-gap: 15px;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 15px;
        display: block;
    }

    .game-canvas {
        height: 400px;
        width: 95%;
    }

    .spaceship-container {
        width: 250px;
        height: 250px;
    }

    .spaceship {
        width: 180px;
        height: 180px;
    }

    .ship-glass {
        width: 160px;
        height: 160px;
    }

    .piggy-astronaut {
        font-size: 70px;
    }

    .orbit-ring {
        width: 220px;
        height: 220px;
    }
}

/* Additional game styles */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
}

.game-controls-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
    z-index: 50;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes shootPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(3);
    }
}

.power-mode {
    animation: powerGlow 0.5s ease-in-out infinite alternate;
}

@keyframes powerGlow {
    from {
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    }
    to {
        box-shadow: 0 0 40px rgba(255, 0, 255, 0.8);
    }
}

/* Performance optimizations */
.particle,
.star,
.floating-element {
    will-change: transform, opacity;
}

.grid-item,
.feature-card,
.btn-primary,
.btn-secondary {
    will-change: transform;
}

/* Smooth transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
