/* 
  Yazar: Melike Ebru KIRKIN
  Proje: Liru Galaxy CSS
  Tarih: Haziran 2025
  Lisans: Creative Commons BY-NC-SA 4.0
  Açıklama: Bu stil dosyası kişisel ve eğitim amaçlı projelerde kullanılabilir. 
  Ticari kullanım için yazılı izin gereklidir.
*/
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* =========================
   CSS CUSTOM PROPERTIES
   ========================= */
:root {
    --primary-gradient: linear-gradient(135deg, #a29bfe, #6c5ce7, #5f3dc4);
    --secondary-gradient: linear-gradient(135deg, #55efc4, #00b894, #00a085);
    --accent-gradient: linear-gradient(135deg, #fd79a8, #e84393, #d63384);
    --background-gradient: linear-gradient(135deg, #0a0a0a 0%, #1a0f2e 25%, #2d1b69 50%, #0f0f23 75%, #000000 100%);
    --nebula-gradient: radial-gradient(ellipse at 30% 20%, rgba(156, 39, 176, 0.4) 0%, transparent 60%);
    
    --font-primary: 'Space Grotesk', sans-serif;
    --font-secondary: 'Orbitron', monospace;
    
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.8);
    --color-text-accent: #a29bfe;
    
    --border-radius-small: 8px;
    --border-radius-medium: 16px;
    --border-radius-large: 24px;
    --border-radius-full: 50px;
    
    --shadow-small: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-large: 0 16px 48px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(162, 155, 254, 0.3);
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* =========================
   BASE STYLES
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: var(--background-gradient);
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    position: relative;
    overflow-x: hidden;
    animation: galacticShift 20s ease-in-out infinite alternate;
}

@keyframes galacticShift {
    0% { background: linear-gradient(135deg, #0a0a0a 0%, #1a0f2e 25%, #2d1b69 50%, #0f0f23 75%, #000000 100%); }
    50% { background: linear-gradient(135deg, #0f0f23 0%, #2d1b69 25%, #4a148c 50%, #6a1b9a 75%, #1a0f2e 100%); }
    100% { background: linear-gradient(135deg, #000000 0%, #4a148c 25%, #673ab7 50%, #3f51b5 75%, #1a0f2e 100%); }
}

/* =========================
   NAVIGATION
   ========================= */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 1.2rem;
}

.brand-icon {
    font-size: 1.5rem;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-item {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: var(--transition-medium);
}

.nav-item:hover {
    color: var(--color-text-primary);
    background: rgba(162, 155, 254, 0.2);
    transform: translateY(-2px);
}

/* =========================
   LİRU GALACTIC BACKGROUND
   ========================= */
.galaxy-nebula {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(156, 39, 176, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(63, 81, 181, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 70%, rgba(233, 30, 99, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(0, 188, 212, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(76, 175, 80, 0.15) 0%, transparent 70%);
    animation: nebulaFlow 30s ease-in-out infinite;
    pointer-events: none;
}

@keyframes nebulaFlow {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.8; }
    25% { transform: rotate(90deg) scale(1.1); opacity: 1; }
    50% { transform: rotate(180deg) scale(0.9); opacity: 0.9; }
    75% { transform: rotate(270deg) scale(1.05); opacity: 0.85; }
}

/* =========================
   STARS SYSTEM
   ========================= */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    border-radius: 50%;
    animation: improvedTwinkle 5s infinite alternate;
}

.star.red {
    background: radial-gradient(circle, #ff6b6b, #e74c3c);
    box-shadow: 0 0 15px #ff6b6b, 0 0 30px #ff6b6b, 0 0 45px rgba(255, 107, 107, 0.3);
}

.star.blue {
    background: radial-gradient(circle, #74b9ff, #0984e3);
    box-shadow: 0 0 15px #74b9ff, 0 0 30px #74b9ff, 0 0 45px rgba(116, 185, 255, 0.3);
}

.star.purple {
    background: radial-gradient(circle, #a29bfe, #6c5ce7);
    box-shadow: 0 0 15px #a29bfe, 0 0 30px #a29bfe, 0 0 45px rgba(162, 155, 254, 0.3);
}

.star.green {
    background: radial-gradient(circle, #55efc4, #00b894);
    box-shadow: 0 0 15px #55efc4, 0 0 30px #55efc4, 0 0 45px rgba(85, 239, 196, 0.3);
}

.star.yellow {
    background: radial-gradient(circle, #fdcb6e, #e17055);
    box-shadow: 0 0 15px #fdcb6e, 0 0 30px #fdcb6e, 0 0 45px rgba(253, 203, 110, 0.3);
}

.star.cyan {
    background: radial-gradient(circle, #81ecec, #00cec9);
    box-shadow: 0 0 15px #81ecec, 0 0 30px #81ecec, 0 0 45px rgba(129, 236, 236, 0.3);
}

@keyframes improvedTwinkle {
    0% { opacity: 0.4; transform: scale(1) rotate(0deg); filter: brightness(1); }
    25% { opacity: 0.8; transform: scale(1.2) rotate(90deg); filter: brightness(1.3); }
    50% { opacity: 1; transform: scale(1.4) rotate(180deg); filter: brightness(1.5); }
    75% { opacity: 0.7; transform: scale(1.1) rotate(270deg); filter: brightness(1.2); }
    100% { opacity: 0.5; transform: scale(0.9) rotate(360deg); filter: brightness(1); }
}

/* =========================
   MAIN APP CONTAINER
   ========================= */
.app-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding-top: 80px;
}

.app-section {
    display: none;
    min-height: calc(100vh - 80px);
    padding: 2rem;
    animation: fadeInUp 0.5s ease;
}

.app-section.active {
    display: block;
}

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

/* =========================
   HOME SECTION
   ========================= */
.welcome-card {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-large);
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-large);
}

.main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #a29bfe, #74b9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-accent {
    color: #fd79a8;
    font-family: var(--font-secondary);
}

.main-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-accent);
    font-family: var(--font-secondary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

.character-showcase {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-medium);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.character-info h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-text-accent);
}

.character-info p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.character-traits {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.trait {
    background: var(--primary-gradient);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    font-size: 0.9rem;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.primary-btn {
    background: var(--primary-gradient);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-full);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

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

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-large);
}

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

.secondary-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    border-radius: var(--border-radius-full);
    color: var(--color-text-primary);
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition-medium);
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.social-section {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.social-section p {
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-medium);
    color: var(--color-text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-medium);
    backdrop-filter: blur(10px);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* =========================
   PROGRESS INDICATOR
   ========================= */
.progress-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-container.visible {
    opacity: 1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(162, 155, 254, 0.5);
}

.progress-text {
    text-align: center;
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

/* =========================
   STORY SECTION
   ========================= */
.story-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.story-timeline {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.story-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-medium);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
    transition: var(--transition-medium);
}

.story-step.active {
    opacity: 1;
    border-color: rgba(162, 155, 254, 0.3);
    box-shadow: var(--shadow-glow);
}

.story-icon {
    font-size: 2rem;
    min-width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 50%;
}

.story-content {
    text-align: left;
}

.story-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-accent);
}

.story-content p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* =========================
   CUSTOMIZE SECTION
   ========================= */
.customize-container {
    max-width: 800px;
    margin: 0 auto;
}

.customization-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.custom-category {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-medium);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-text-accent);
}

.color-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.color-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition-medium);
    position: relative;
}

.color-btn.active {
    border-color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.custom-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================
   ACHIEVEMENTS SECTION
   ========================= */
.achievements-container {
    max-width: 1000px;
    margin: 0 auto;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-medium);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: var(--transition-medium);
    opacity: 0.6;
}

.achievement-card.earned {
    opacity: 1;
    border-color: rgba(85, 239, 196, 0.5);
    box-shadow: 0 0 30px rgba(85, 239, 196, 0.2);
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

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

.achievement-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-accent);
}

.achievement-card p {
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.achievement-date {
    font-size: 0.8rem;
    color: var(--color-text-accent);
    font-style: italic;
}

.achievement-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar.small {
    height: 6px;
    flex: 1;
}

/* =========================
   SPACESHIP DOOR
   ========================= */
.spaceship-door-container {
    position: fixed;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.spaceship-door-frame {
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    background: linear-gradient(145deg, #2c3e50, #34495e, #2c3e50);
    border-radius: 60px;
    box-shadow: 
        0 0 60px rgba(52, 152, 219, 0.5),
        inset 0 0 40px rgba(255, 255, 255, 0.1),
        0 0 120px rgba(155, 89, 182, 0.3);
    border: 4px solid #3498db;
    animation: improvedSpaceshipGlow 4s ease-in-out infinite alternate;
}

@keyframes improvedSpaceshipGlow {
    0% { 
        box-shadow: 
            0 0 60px rgba(52, 152, 219, 0.5),
            inset 0 0 40px rgba(255, 255, 255, 0.1),
            0 0 120px rgba(155, 89, 182, 0.3);
        border-color: #3498db;
    }
    50% { 
        box-shadow: 
            0 0 100px rgba(52, 152, 219, 0.8),
            inset 0 0 60px rgba(255, 255, 255, 0.2),
            0 0 180px rgba(155, 89, 182, 0.5);
        border-color: #74b9ff;
    }
    100% { 
        box-shadow: 
            0 0 80px rgba(52, 152, 219, 0.9),
            inset 0 0 50px rgba(255, 255, 255, 0.25),
            0 0 200px rgba(155, 89, 182, 0.6);
        border-color: #a29bfe;
    }
}

.spaceship-door {
    width: 160px;
    height: 240px;
    background: linear-gradient(145deg, #34495e, #2c3e50, #34495e);
    border-radius: 40px;
    position: relative;
    border: 4px solid #3498db;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.6),
        inset 0 0 40px rgba(52, 152, 219, 0.3);
    animation: doorPulse 3s ease-in-out infinite;
}

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

.spaceship-door.opening {
    animation: improvedDoorOpen 1.5s ease-in-out forwards;
}

@keyframes improvedDoorOpen {
    0% { transform: scaleX(1); opacity: 1; filter: brightness(1); }
    30% { transform: scaleX(0.9); opacity: 0.9; filter: brightness(1.2); }
    70% { transform: scaleX(0.3); opacity: 0.5; filter: brightness(1.5); }
    100% { transform: scaleX(0.05); opacity: 0.1; filter: brightness(2); }
}

.door-lights {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.door-light {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #e74c3c;
    box-shadow: 0 0 15px #e74c3c, inset 0 0 5px rgba(255, 255, 255, 0.3);
    animation: improvedDoorLightSequence 2.5s infinite;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.door-light:nth-child(2) {
    background: #f39c12;
    box-shadow: 0 0 15px #f39c12, inset 0 0 5px rgba(255, 255, 255, 0.3);
    animation-delay: 0.4s;
}

.door-light:nth-child(3) {
    background: #27ae60;
    box-shadow: 0 0 15px #27ae60, inset 0 0 5px rgba(255, 255, 255, 0.3);
    animation-delay: 0.8s;
}

.door-light:nth-child(4) {
    background: #3498db;
    box-shadow: 0 0 15px #3498db, inset 0 0 5px rgba(255, 255, 255, 0.3);
    animation-delay: 1.2s;
}

@keyframes improvedDoorLightSequence {
    0%, 70% { opacity: 0.3; transform: scale(1); }
    10%, 60% { opacity: 1; transform: scale(1.3); box-shadow: 0 0 25px currentColor, inset 0 0 8px rgba(255, 255, 255, 0.5); }
}

.door-center-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 90px;
    background: linear-gradient(145deg, #3498db, #2980b9, #74b9ff);
    border-radius: 20px;
    border: 3px solid #85c1e9;
    box-shadow: 
        0 0 30px rgba(52, 152, 219, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: panelGlow 3s ease-in-out infinite alternate;
}

@keyframes panelGlow {
    0% { box-shadow: 0 0 30px rgba(52, 152, 219, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.3); }
    100% { box-shadow: 0 0 50px rgba(52, 152, 219, 0.9), inset 0 0 30px rgba(255, 255, 255, 0.5); }
}

.light-beam {
    position: absolute;
    top: 50%;
    left: 100%;
    width: 400px;
    height: 120px;
    background: linear-gradient(90deg, 
        rgba(52, 152, 219, 0.9) 0%, 
        rgba(155, 89, 182, 0.7) 30%,
        rgba(74, 185, 255, 0.5) 60%,
        transparent 100%);
    transform: translateY(-50%);
    opacity: 0;
    border-radius: 60px;
    filter: blur(8px);
}

.spaceship-door.opening .light-beam {
    animation: improvedLightBeamShow 1.5s ease-out forwards;
}

@keyframes improvedLightBeamShow {
    0% { opacity: 0; width: 0px; filter: blur(20px); }
    30% { opacity: 0.7; width: 200px; filter: blur(15px); }
    70% { opacity: 1; width: 400px; filter: blur(8px); }
    100% { opacity: 0.8; width: 500px; filter: blur(5px); }
}

/* =========================
   CHARACTER
   ========================= */
.character {
    position: fixed;
    left: 15%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    transition: none;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}

.character:not(.running):not(.entering):not(.celebrating) {
    animation: characterIdle 4s ease-in-out infinite;
}

@keyframes characterIdle {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(-45%); }
}

.character.running {
    animation: runToDoor 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    
}
@media screen and (max-width: 767px) {
  .character.running {
    animation: runToDoor 2s ease-in-out forwards;
  }
}



.character.entering {
    animation: enterSpaceshipDoor 1.2s ease-in-out forwards;
}

.character.celebrating {
    animation: jumpAndCelebrate 4s ease-in-out forwards;
}

/* Character Body */
.character-body {
    width: 50px;
    height: 75px;
    background: linear-gradient(145deg, #fd79a8, #e84393, #fd79a8);
    border-radius: 25px 25px 10px 10px;
    position: relative;
    border: 2px solid #d63384;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Character Head */
.character-head {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 35% 30%, #fdbcb4, #f4a460, #deb887);
    border-radius: 50%;
    position: absolute;
    top: -35px;
    left: 5px;
    border: 2px solid #deb887;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Eyes */
.character-eyes {
    position: absolute;
    top: 12px;
    left: 8px;
    width: 24px;
    height: 8px;
}

.character-eye {
    width: 7px;
    height: 7px;
    background: radial-gradient(circle, #74b9ff, #0984e3, #2d3436);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 5px #74b9ff, inset 1px 1px 2px rgba(255, 255, 255, 0.8);
    animation: eyeBlink 6s infinite;
}

.character-eye.left {
    left: 0;
}

.character-eye.right {
    right: 0;
}

@keyframes eyeBlink {
    0%, 85%, 95%, 100% { transform: scaleY(1); }
    90% { transform: scaleY(0.1); }
}

/* Smile */
.character-smile {
    position: absolute;
    top: 22px;
    left: 14px;
    width: 12px;
    height: 6px;
    border: 2px solid #2d3436;
    border-top: none;
    border-radius: 0 0 12px 12px;
    animation: smileAnimation 5s ease-in-out infinite;
}

@keyframes smileAnimation {
    0%, 70%, 100% { transform: scale(1); }
    85% { transform: scale(1.1); }
}

/* Hair */
.character-hair {
    position: absolute;
    top: -37px;
    left: 2px;
    width: 44px;
    height: 30px;
    background: linear-gradient(145deg, #e17055, #d63031, #fd79a8);
    border-radius: 25px 25px 15px 15px;
    z-index: -1;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
    animation: hairFlow 6s ease-in-out infinite;
}

@keyframes hairFlow {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(1deg); }
}

.character-hair::before {
    content: '';
    position: absolute;
    top: 5px;
    left: -8px;
    width: 20px;
    height: 25px;
    background: linear-gradient(145deg, #e17055, #d63031);
    border-radius: 15px 5px 10px 15px;
    transform: rotate(-15deg);
    animation: hairSideFlow 7s ease-in-out infinite;
}

.character-hair::after {
    content: '';
    position: absolute;
    top: 5px;
    right: -8px;
    width: 20px;
    height: 25px;
    background: linear-gradient(145deg, #e17055, #d63031);
    border-radius: 5px 15px 15px 10px;
    transform: rotate(15deg);
    animation: hairSideFlow 7s ease-in-out infinite reverse;
}

@keyframes hairSideFlow {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(-12deg); }
}

/* Arms */
.character-arms {
    position: absolute;
    top: 20px;
    left: -10px;
    width: 70px;
    height: 35px;
}

.character-arm {
    width: 18px;
    height: 35px;
    background: linear-gradient(145deg, #fdbcb4, #f4a460, #deb887);
    position: absolute;
    border-radius: 10px;
    border: 1px solid #deb887;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.character-arm.left {
    left: 0;
    transform-origin: top center;
}

.character-arm.right {
    right: 0;
    transform-origin: top center;
}

.character:not(.running):not(.celebrating) .character-arm {
    animation: idleArms 8s ease-in-out infinite;
}

@keyframes idleArms {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.character.running .character-arm {
    animation: runArms 0.3s infinite alternate;
}

.character.celebrating .character-arm {
    animation: celebrateArms 0.8s infinite alternate;
}

@keyframes runArms {
    0% { transform: rotate(-30deg); }
    100% { transform: rotate(30deg); }
}

@keyframes celebrateArms {
    0% { transform: rotate(-70deg) scale(1); }
    100% { transform: rotate(70deg) scale(1.1); }
}

/* Legs */
.character-legs {
    position: absolute;
    bottom: -30px;
    left: 10px;
    width: 35px;
    height: 30px;
}

.character-leg {
    width: 15px;
    height: 30px;
    background: linear-gradient(145deg, #a29bfe, #6c5ce7, #5f3dc4);
    position: absolute;
    border-radius: 0 0 10px 10px;
    border: 1px solid #4c6ef5;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.character-leg:first-child {
    left: 0;
}

.character-leg:last-child {
    right: 0;
}

.character:not(.running):not(.celebrating) .character-leg {
    animation: idleLegs 10s ease-in-out infinite;
}

@keyframes idleLegs {
    0%, 90%, 100% { transform: rotate(0deg); }
    95% { transform: rotate(2deg); }
}

.character.running .character-leg {
    animation: runLegs 0.2s infinite;
}

.character.celebrating .character-leg {
    animation: jumpLegs 0.8s infinite;
}

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

@keyframes jumpLegs {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(0deg) translateY(-15px); }
}

/* =========================
   CHARACTER ANIMATIONS
   ========================= */
/* Masaüstü ve tabletler için */
@keyframes runToDoor {
  0% {
    left: 15%;
  }
  100% {
    left: calc(92% - 220px);
  }
}

/* Mobil için özel animasyon */
@media screen and (max-width: 767px) {
  @keyframes runToDoor {
    0% {
      left: 10%;
    }
    100% {
      left: calc(85% - 60px); /* kapıya göre sağa kaydırıyoruz */
    }
  }

  .character.running {
    animation: runToDoor 2s ease-in-out forwards;
  }
}




@keyframes enterSpaceshipDoor {
    0% {
        left: calc(92% - 220px);
        transform: translateY(-50%) scale(1);
        opacity: 1;
        filter: brightness(1);
    }
    100% {
        left: calc(92% - 100px);
        transform: translateY(-50%) scale(0.3);
        opacity: 0;
        filter: brightness(0.3);
    }
}

/* Masaüstü ve tablet */
@keyframes jumpAndCelebrate {
  0% {
    left: calc(92% - 100px);
    transform: translateY(-50%) scale(0.3);
    opacity: 0;
    filter: brightness(0.3);
  }
  15% {
    left: calc(92% - 40px);
    transform: translateY(-50%) scale(0.8);
    opacity: 1;
    filter: brightness(1);
  }
  100% {
    left: calc(92% - 40px);
    transform: translateY(-50%) scale(1);
  }
}

/* Mobil */
@media screen and (max-width: 767px) {
  @keyframes jumpAndCelebrate {
    0% {
      right: 2%;
      transform: translateY(-50%) scale(0.3);
      opacity: 0;
      filter: brightness(0.3);
    }
    15% {
      right: 2%;
      transform: translateY(-50%) scale(0.8);
      opacity: 1;
      filter: brightness(1);
    }
    100% {
      right: 2%;
      transform: translateY(-50%) scale(1);
    }
  }

  .character.celebrating {
    left: auto !important; /* varsa override etsin */
    right: 2%;             /* kapının sağ konumuna denk */
    z-index: 1000 !important;
  }
}




/* =========================
   CONFETTI
   ========================= */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: improvedConfettiFall 4s linear forwards;
    z-index: 15;
    border-radius: 2px;
    box-shadow: 0 0 5px currentColor;
}

.confetti.blue { background: #74b9ff; }
.confetti.yellow { background: #fdcb6e; }
.confetti.purple { background: #a29bfe; }
.confetti.pink { background: #fd79a8; }
.confetti.green { background: #55efc4; }

@keyframes improvedConfettiFall {
    0% {
        transform: translateY(-150px) rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        opacity: 1;
        transform: translateY(50vh) rotate(360deg) scale(1.2);
    }
    100% {
        transform: translateY(120vh) rotate(720deg) scale(0.8);
        opacity: 0;
    }
}

/* =========================
   MODAL
   ========================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: modalFadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

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

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-large);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    width: 90%;
    animation: modalSlideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--color-text-accent);
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-medium);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 0 2rem 1rem;
}

.modal-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
}

.stat-icon {
    font-size: 1.2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 2rem 2rem;
    justify-content: center;
}

/* =========================
   RESET BUTTON
   ========================= */
.reset-btn {
    position: fixed;
    top: 100px;
    left: 30px;
    background: var(--secondary-gradient);
    border: none;
    padding: 16px 32px;
    border-radius: 40px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-primary);
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-medium);
    z-index: 15;
    animation: resetButtonFloat 6s ease-in-out infinite;
}

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

.reset-btn:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: var(--shadow-large);
}

/* =========================
   RESPONSIVE DESIGN
   ========================= */

/* Mobile Devices (320px - 767px) */
@media screen and (max-width: 767px) {
    .main-nav {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 0.5rem;
    }
    
    .nav-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .app-section {
        padding: 1rem;
    }
    
    .welcome-card {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .main-subtitle {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .character {
        left: 10%;
        transform: translateY(-50%) scale(0.8);
    }
    
    .spaceship-door-container {
        right: 5%;
    }
    
    .spaceship-door {
        width: 120px;
        height: 180px;
    }

    @media screen and (max-width: 767px) {
  .spaceship-door-container {
    right: 5%;
    transform: translateY(-50%) scale(0.8);
    z-index: 10;
  }

  .spaceship-door {
    width: 110px;
    height: 170px;
    opacity: 0.9;
  }
}
    
    .progress-container {
        width: 90%;
        max-width: 350px;
        padding: 1.5rem;
    }
    
    .story-step {
        flex-direction: column;
        text-align: center;
    }
    
    .story-content {
        text-align: center;
    }
    
    .customization-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .reset-btn {
        top: 80px;
        left: 15px;
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* Tablet Devices (768px - 1199px) */
@media screen and (min-width: 768px) and (max-width: 1199px) {
    .main-nav {
        padding: 1rem 1.5rem;
    }
    
    .app-section {
        padding: 1.5rem;
    }
    
    .welcome-card {
        padding: 2.5rem;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .character {
        left: 12%;
        transform: translateY(-50%) scale(0.9);
    }
    
    .spaceship-door-container {
        right: 6%;
    }
    
    .spaceship-door {
        width: 140px;
        height: 210px;
    }
    
    .progress-container {
        width: 80%;
        max-width: 400px;
    }
    
    .customization-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reset-btn {
        top: 90px;
        left: 25px;
    }
}

/* Large Desktop (1200px+) */
@media screen and (min-width: 1200px) {
    .app-section {
        padding: 2rem 3rem;
    }
    
    .welcome-card {
        padding: 3.5rem;
    }
    
    .main-title {
        font-size: 3.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .spaceship-door {
        width: 180px;
        height: 260px;
    }
    
    .customization-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Footer */
.footer {
  background: linear-gradient(to bottom, rgba(8, 8, 24, 0.9), rgba(5, 5, 17, 1));
  padding-top: var(--spacing-4xl);
  padding-bottom: var(--spacing-xl);
  position: relative;
  overflow: hidden;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: var(--font-size-sm);
  opacity: 0.7;
  margin-bottom: 0;
}

@media screen and (max-width: 767px) {
  .character {
    top: 60%;
    left: 5% !important;
    transform: translateY(-50%) scale(0.7);
  }

  .spaceship-door-container {
    right: 2%;
  }

  .spaceship-door {
    width: 100px;
    height: 160px;
  }
}

/* Hamburger Button */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  margin-left: auto;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

/* Mobil Menüyü gizle */
@media (max-width: 830px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.95);
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    padding: 20px 0;
    text-align: center;
    z-index: 1000;
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-item {
    margin: 10px 0;
    font-size: 18px;
  }

  .hamburger-btn {
    display: flex;
  }
}




