/* CSS Variables for Color Palette */
:root {
    --primary-color: #1A535C;
    --secondary-color: #4ECDC4;
    --light-color: #F7FFF7;
    --accent-color: #FF6B6B;
    --warning-color: #FFE66D;
    
    --gradient-primary: linear-gradient(135deg, #1A535C 0%, #4ECDC4 100%);
    --gradient-secondary: linear-gradient(135deg, #4ECDC4 0%, #F7FFF7 100%);
    --gradient-accent: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%);
    --gradient-dark: linear-gradient(135deg, #0f3a42 0%, #1A535C 100%);
    
    --shadow-light: 0 2px 10px rgba(26, 83, 92, 0.1);
    --shadow-medium: 0 4px 20px rgba(26, 83, 92, 0.15);
    --shadow-heavy: 0 8px 30px rgba(26, 83, 92, 0.2);
    
    --border-radius: 12px;
    --border-radius-small: 8px;
    --border-radius-large: 20px;
    
    --font-primary: 'Orbitron', monospace;
    --font-secondary: 'Roboto', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --light-color: #1a1a1a;
    --primary-color: #4ECDC4;
    --secondary-color: #1A535C;
    --gradient-primary: linear-gradient(135deg, #4ECDC4 0%, #1A535C 100%);
    --gradient-secondary: linear-gradient(135deg, #1A535C 0%, #0f3a42 100%);
}

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

body {
    font-family: var(--font-secondary);
    background: var(--gradient-primary);
    color: var(--primary-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: var(--light-color);
}

.loading-logo {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 2rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.loading-bar {
    width: 300px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.loading-progress {
    height: 100%;
    background: var(--gradient-accent);
    width: 0%;
    animation: loadingProgress 2s ease-in-out forwards;
}

.loading-text {
    font-size: 1.1rem;
    opacity: 0.8;
}

@keyframes loadingProgress {
    to { width: 100%; }
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container.hidden {
    display: none;
}

/* Header */
.app-header {
    background: var(--gradient-dark);
    padding: 1rem;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--light-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.user-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    backdrop-filter: blur(10px);
}

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

.user-level {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--light-color);
    min-width: 150px;
}

.xp-bar {
    width: 150px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.xp-progress {
    height: 100%;
    background: var(--gradient-accent);
    transition: width 0.5s ease;
    border-radius: 4px;
}

/* Screen Management */
.screen {
    display: none;
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.screen.active {
    display: block;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--light-color);
    box-shadow: var(--shadow-light);
}

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

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-danger {
    background: var(--gradient-accent);
    color: var(--light-color);
    box-shadow: var(--shadow-light);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius-large);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Login Screen */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.login-hero {
    margin-bottom: 3rem;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: 4rem;
    font-weight: 900;
    color: var(--light-color);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--light-color);
    opacity: 0.9;
    max-width: 500px;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    margin-bottom: 3rem;
    width: 100%;
    max-width: 400px;
}

.login-features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-color);
    opacity: 0.8;
}

.feature-icon {
    font-size: 2rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(26, 83, 92, 0.2);
    border-radius: var(--border-radius);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light-color);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

/* Character Creation */
.character-creation-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    color: var(--light-color);
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.character-preview {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
}

.character-avatar {
    font-size: 6rem;
    margin-bottom: 1rem;
}

.character-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.character-options {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
}

.option-group {
    margin-bottom: 2rem;
}

.option-group h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.avatar-option {
    padding: 1rem;
    border: 2px solid rgba(26, 83, 92, 0.2);
    border-radius: var(--border-radius);
    background: var(--light-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.avatar-option:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.avatar-option.active {
    border-color: var(--secondary-color);
    background: rgba(78, 205, 196, 0.1);
}

/* Dashboard */
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
    flex-wrap: wrap;
    gap: 1rem;
}

.character-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.character-avatar-small {
    font-size: 3rem;
    padding: 0.5rem;
    background: var(--gradient-secondary);
    border-radius: 50%;
}

.character-details h2 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.character-class {
    color: var(--secondary-color);
    font-weight: 500;
}

.quick-stats {
    display: flex;
    gap: 2rem;
}

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

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

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

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Progress Ring */
.adventure-progress {
    text-align: center;
}

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
}

.progress-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--secondary-color) 0deg, rgba(78, 205, 196, 0.2) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background: var(--light-color);
    border-radius: 50%;
}

#adventure-progress-text {
    position: relative;
    z-index: 1;
    font-weight: 700;
    color: var(--primary-color);
}

/* Missions */
.missions-container {
    max-width: 800px;
    margin: 0 auto;
}

.missions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.missions-header h2 {
    color: var(--light-color);
    font-family: var(--font-primary);
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.missions-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: var(--light-color);
}

.missions-list {
    display: none;
}

.missions-list.active {
    display: block;
}

.mission-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mission-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.mission-item.completed {
    opacity: 0.7;
    background: rgba(78, 205, 196, 0.1);
}

.mission-content {
    flex: 1;
}

.mission-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.mission-description {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.mission-reward {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.mission-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Adventure Map */
.map-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.map-container h2 {
    color: var(--light-color);
    font-family: var(--font-primary);
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.map-world {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
}

.world-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.world-header p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.map-path {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    align-items: center;
}

.map-node {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.map-node.completed {
    background: var(--gradient-primary);
    color: var(--light-color);
    box-shadow: var(--shadow-medium);
}

.map-node.current {
    background: var(--gradient-accent);
    color: var(--light-color);
    animation: pulse 2s infinite;
    box-shadow: var(--shadow-medium);
}

.map-node.locked {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.3);
    cursor: not-allowed;
}

.map-node:hover:not(.locked) {
    transform: scale(1.1);
}

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

.map-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.legend-icon {
    font-size: 1.5rem;
}

/* Boss Challenge */
.boss-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.boss-container h2 {
    color: var(--light-color);
    font-family: var(--font-primary);
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.boss-arena {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.boss-character,
.player-character {
    flex: 1;
    min-width: 200px;
}

.boss-avatar,
.player-avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.boss-name,
.player-name {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.boss-health-bar,
.player-health-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.health-progress {
    height: 100%;
    background: var(--gradient-accent);
    transition: width 0.5s ease;
}

.vs-indicator {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.boss-challenge-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
}

.boss-challenge-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.boss-challenge-info p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.challenge-progress {
    text-align: left;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
}

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

/* Shop */
.shop-container {
    max-width: 1000px;
    margin: 0 auto;
}

.shop-container h2 {
    color: var(--light-color);
    font-family: var(--font-primary);
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    text-align: center;
}

.shop-categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    overflow-x: auto;
}

.category-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--primary-color);
    white-space: nowrap;
}

.category-btn.active {
    background: var(--gradient-primary);
    color: var(--light-color);
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.shop-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: var(--transition);
}

.shop-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.item-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.item-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.item-description {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.item-price {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: block;
}

/* Profile */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-medium);
    flex-wrap: wrap;
}

.profile-avatar {
    font-size: 5rem;
    padding: 1rem;
    background: var(--gradient-secondary);
    border-radius: 50%;
}

.profile-info h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.profile-info p {
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    text-align: center;
}

.stat-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.achievement-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: var(--transition);
}

.achievement-item.unlocked {
    background: var(--gradient-secondary);
}

.achievement-item:hover {
    transform: translateY(-2px);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.achievement-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.achievement-description {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Settings */
.settings-container {
    max-width: 600px;
    margin: 0 auto;
}

.settings-container h2 {
    color: var(--light-color);
    font-family: var(--font-primary);
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    text-align: center;
}

.settings-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
}

.settings-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--gradient-primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--light-color);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(26, 83, 92, 0.1);
}

.modal-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(26, 83, 92, 0.1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(26, 83, 92, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Bottom Navigation */
.bottom-nav {
    display: flex;
    background: var(--gradient-dark);
    box-shadow: var(--shadow-medium);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    min-width: 0;
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--light-color);
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Footer */
.app-footer {
    background: var(--primary-color);
    color: var(--light-color);
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.app-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .user-stats {
        justify-content: center;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .boss-arena {
        flex-direction: column;
    }
    
    .vs-indicator {
        transform: rotate(90deg);
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .nav-label {
        display: none;
    }
    
    .nav-icon {
        font-size: 1.2rem;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 1rem 0.5rem;
    }
    
    .login-form {
        padding: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-items {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-10px); }
    70% { transform: translateY(-5px); }
    90% { transform: translateY(-2px); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

/* Mission completion animation */
@keyframes missionComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: var(--gradient-accent); }
    100% { transform: scale(1); }
}

.mission-completing {
    animation: missionComplete 0.5s ease-in-out;
}

/* XP gain animation */
@keyframes xpGain {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-50px) scale(1.2); opacity: 0; }
}

.xp-popup {
    position: fixed;
    z-index: 1001;
    font-weight: bold;
    color: var(--warning-color);
    font-size: 1.2rem;
    pointer-events: none;
    animation: xpGain 1s ease-out forwards;
}
