/* RAGE OF DRAGONS - STYLES.CSS (Enhanced with Timer & Battle Systems) */

:root {
    /* Premium Color Palette - Enhanced Visual Quality */
    --bg: #0a0f1f;
    --grad1: #1a2332;
    --grad2: #0f1627;
    --panel: #141b2e;
    --panel2: #0e1526;
    --ink: #f0f6ff;
    --muted: #b4c3e1;
    --brand: #6366f1;
    --brand-light: #8b5cf6;
    --brand-dark: #4f46e5;
    --gold: #fbbf24;
    --gold-light: #fcd34d;
    --gold-dark: #f59e0b;
    --ingot: #a855f7;
    --gems: #06d6a0; /* New premium currency color */
    --hp1: #ef4444;
    --hp2: #f59e0b;
    --hp3: #22c55e;
    --bar: #2d3748;
    --ok: #10b981;
    --br: #2a344a;
    --warning: #f59e0b;
    --error: #ef4444;
    --success: #10b981;
    
    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-gold: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --gradient-dark: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --gradient-panel: linear-gradient(145deg, #1a2332 0%, #0f1627 100%);
    --gradient-card: linear-gradient(145deg, #141b2e 0%, #0e1526 100%);
    
    /* Glow Effects */
    --glow-brand: 0 0 20px rgba(99, 102, 241, 0.3);
    --glow-gold: 0 0 20px rgba(251, 191, 36, 0.3);
    --glow-gems: 0 0 20px rgba(6, 214, 160, 0.3);
    --glow-success: 0 0 15px rgba(16, 185, 129, 0.3);
    --glow-error: 0 0 15px rgba(239, 68, 68, 0.3);
    
    /* Skill System Colors */
    --skill-common: #9ca3af;
    --skill-rare: #3b82f6;
    --skill-epic: #a855f7;
    --skill-legendary: #f59e0b;
    --skill-mythic: #ef4444;
    --skill-bg: #111827;
}

/* Image and Sprite Styles */
.dragon-sprite,
.hero-sprite, 
.potion-sprite,
.book-sprite,
.egg-sprite,
.hatching-egg-sprite,
.building-sprite {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid var(--brand);
    background: var(--gradient-card);
    padding: 6px;
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.dragon-sprite:hover,
.hero-sprite:hover,
.potion-sprite:hover,
.book-sprite:hover,
.egg-sprite:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(122, 166, 255, 0.4);
    border-color: #7aa6ff;
}

.dragon-card .dragon-sprite {
    width: 280px;
    height: 210px;
    margin: 10px auto;
}

/* Market specific dragon images */
.market-dragon-image, .dragon-image img {
    width: 300px !important;
    height: 225px !important;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
}

/* Village dragon display */
.village-dragon-display .dragon-sprite {
    width: 320px !important;
    height: 240px !important;
    border-radius: 18px;
}

/* Hero portraits */
.hero-image img, .hero-sprite {
    width: 250px !important;
    height: 333px !important;
    object-fit: cover;
    border-radius: 15px;
}

/* Building images */
.building-image img, .building-sprite {
    width: 400px !important;
    height: 300px !important;
    object-fit: cover;
    border-radius: 12px;
}

/* Village container with background */
.village-container {
    position: relative !important;
    min-height: 600px !important;
    background-image: url('../assets/environments/village/village_background.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    margin: 10px 0 !important;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.1) !important;
}

/* Try to load village background, fallback to gradient */
.village-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../assets/environments/village/village_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 0;
}

.village-container > * {
    position: relative;
    z-index: 1;
}

/* Village buildings positioned dynamically */
.village-building {
    position: absolute !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 2 !important;
}

.village-building:hover {
    transform: scale(1.05) !important;
    z-index: 10 !important;
}

.village-building img {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    border: 2px solid var(--brand) !important;
}

/* Construction elements */
.village-construction {
    position: absolute !important;
    z-index: 1 !important;
}

.village-construction img {
    opacity: 0.8 !important;
    border: 2px dashed var(--gold) !important;
    border-radius: 6px !important;
}

.hero-card .hero-sprite {
    width: 220px;
    height: 280px;
}

.potion-card .potion-sprite,
.book-card .book-sprite,
.egg-card .egg-sprite {
    width: 120px !important;
    height: 120px !important;
    object-fit: cover;
}

.building-sprite {
    width: 96px;
    height: 96px;
}

/* Icon placeholders for fallback */
.icon-placeholder {
    width: 64px;
    height: 64px;
    background: var(--gradient-dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 24px;
    font-weight: bold;
    border: 2px solid var(--brand);
}

/* General image error handling */
img[src*="assets"] {
    transition: opacity 0.3s ease;
}

img[src*="assets"]:not(:error) {
    opacity: 1;
}

img[src*="assets"]:error {
    opacity: 0;
}
    
    /* Android Optimization Variables */
    --touch-target: 48px;
    --android-spacing: 16px;
    --android-radius: 8px;
    --android-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Authentication Styles */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--gradient-dark);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.game-title {
    font-size: 3rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: var(--glow-gold);
}

.auth-subtitle {
    color: var(--muted);
    font-size: 1.2rem;
    margin: 0;
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.google-play-btn {
    background: #4285F4;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.google-play-btn:hover {
    background: #3367D6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.email-btn {
    background: var(--gradient-primary);
    box-shadow: var(--glow-brand);
}

.email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.facebook-btn {
    background: #4267B2;
    box-shadow: 0 4px 15px rgba(66, 103, 178, 0.3);
}

.facebook-btn:hover {
    background: #365899;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 103, 178, 0.4);
}

.discord-btn {
    background: #5865F2;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.discord-btn:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.guest-btn {
    background: var(--gradient-primary);
    box-shadow: var(--glow-brand);
}

.guest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.dev-btn {
    background: #333 !important;
    color: #fff !important;
    font-size: 12px !important;
    padding: 8px 16px !important;
}

.dev-btn:hover {
    background: #444 !important;
}

.auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-weight: bold;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 10px 0;
    color: var(--muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(180, 195, 225, 0.3);
}

.auth-divider span {
    padding: 0 15px;
}

.auth-info {
    text-align: center;
    margin-top: 30px;
    color: var(--muted);
    font-size: 14px;
    max-width: 350px;
    line-height: 1.5;
}

.developer-login {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .auth-container {
        padding: 15px;
    }
    
    .auth-options {
        max-width: 100%;
    }
    
    .developer-login {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 20px;
    }
}

/* Email Authentication Form */
.email-auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--gradient-dark);
}

.email-form {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--ink);
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--panel2);
    border: 2px solid var(--br);
    border-radius: 8px;
    color: var(--ink);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.primary-btn {
    background: var(--gradient-primary);
    flex: 1;
}

.secondary-btn {
    background: var(--gradient-card);
    border: 2px solid var(--br);
    flex: 1;
}

.secondary-btn:hover {
    background: var(--panel);
    border-color: var(--brand);
}

@media (max-width: 768px) {
    .email-form {
        margin: 0;
        padding: 20px;
    }
    
    .auth-buttons {
        flex-direction: column;
    }
}
    --skill-border: #374151;
    --skill-hover: #1f2937;
    
    /* Timer & Battle Colors */
    --timer-normal: #22c55e;
    --timer-warning: #f59e0b;
    --timer-danger: #ef4444;
    --timeout-bg: rgba(239, 68, 68, 0.9);
    
    /* Android Performance Variables */
    --android-border-radius: 12px;
    --touch-target-size: 44px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 214, 160, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #0a0f1f 0%, #1a2332 50%, #0f1627 100%);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Arial, sans-serif;
    
    /* Android/Mobile optimizations */
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px;
}

.card {
    background: var(--gradient-card);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(99, 102, 241, 0.1);
    padding: 24px;
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.card2 {
    background: var(--gradient-panel);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(168, 85, 247, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.card2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--gems));
}

.card2::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Typography */
h1, h2, h3 {
    margin: 0 0 12px;
    font-weight: 800;
}

h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--brand), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.9rem;
}

/* Premium Buttons - Enhanced Visual & Touch */
.btn {
    background: var(--gradient-primary);
    border: 0;
    color: white;
    border-radius: 16px;
    padding: 16px 24px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Android Touch Optimization */
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

.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.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.btn:disabled, .btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-sec {
    background: linear-gradient(180deg, #192448, #111b36);
}

.btn-gold {
    background: var(--gradient-gold);
    box-shadow: 
        0 8px 25px rgba(251, 191, 36, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #1a1a1a;
    font-weight: 900;
}

.btn-gold:hover:not(:disabled) {
    box-shadow: 
        0 15px 40px rgba(251, 191, 36, 0.5),
        var(--glow-gold);
    transform: translateY(-3px) scale(1.02);
}

.btn-gems {
    background: linear-gradient(135deg, #06d6a0 0%, #10b981 100%);
    box-shadow: 
        0 8px 25px rgba(6, 214, 160, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 900;
}

.btn-gems:hover:not(:disabled) {
    box-shadow: 
        0 15px 40px rgba(6, 214, 160, 0.5),
        var(--glow-gems);
    transform: translateY(-3px) scale(1.02);
}

.btn-danger {
    background: linear-gradient(180deg, var(--error), #dc2626);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 10px;
}

.btn-buy {
    background: linear-gradient(180deg, var(--ok), #16a34a);
    color: white;
}

.btn-primary {
    background: linear-gradient(180deg, var(--brand), #2563eb);
}

.btn-cancel {
    background: linear-gradient(180deg, #64748b, #475569);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
}

/* Layout Helpers */
.row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.col {
    flex: 1 1 300px;
}

.grid {
    display: grid;
    gap: 12px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Top Bar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, #0b1328, #081026);
    border: 1px solid var(--br);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
}

.topbar-title {
    font-weight: 900;
    font-size: 1.1rem;
}

.topbar-resources {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Pills & Resources */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #172341;
    border: 1px solid #22325a;
    color: #cfe3ff;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
}

.pill-gold {
    background: linear-gradient(135deg, var(--gold), #d97706);
    border-color: #f59e0b;
    color: #1b1500;
}

.pill-ingot {
    background: linear-gradient(135deg, var(--ingot), #a855f7);
    border-color: #c084fc;
    color: #1c1432;
}

.pill-level {
    background: linear-gradient(135deg, var(--ok), #16a34a);
    border-color: #22c55e;
    color: #0f1e0c;
}

/* Progress Bars */
.bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 260px;
    flex: 1;
    max-width: 560px;
}

.bar {
    background: var(--bar);
    height: 16px;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
    position: relative;
}

.bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--ok), #84cc16);
    transition: width 0.3s ease;
}

.bar .txt {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #e8f3ff;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
    pointer-events: none;
    font-weight: 700;
}

.hpbar > span {
    background: linear-gradient(90deg, var(--hp1), var(--hp2));
}

/* Lists & Items */
.list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item {
    background: linear-gradient(180deg, #111a34, #0e152b);
    border: 1px solid #23325a;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s ease;
}

.item:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

/* Dragon Cards */
.dragon-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dragon-card.disabled-target {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    border-color: var(--error) !important;
    filter: grayscale(50%);
}

.dragon-card.disabled-target:hover {
    transform: none !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.dragon-card.valid-target {
    border-color: var(--ok) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.dragon-card.valid-target:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.7);
}

/* Skill Button Styles */
.skill-btn.btn-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: var(--panel2) !important;
    border-color: var(--error) !important;
    color: var(--muted) !important;
}

.skill-btn.btn-disabled:hover {
    transform: none !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3) !important;
}

.skill-btn:not(.btn-disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.skill-btn {
    position: relative;
    transition: all 0.3s ease;
}

.skill-btn.btn-disabled::after {
    content: "⚠️ Yetersiz Mana";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--error);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1000;
}

.skill-btn.btn-disabled:hover::after {
    opacity: 1;
}

.dragon-card[aria-selected="true"] {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(122, 166, 255, 0.3);
}

.dragon-visual {
    width: 200px;
    height: 160px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0b122a, #1a1f3a);
    border: 1px solid var(--br);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
}

.dragon-placeholder {
    color: var(--muted);
    font-size: 48px;
    text-align: center;
}

/* Enhanced Dragon Card for Barracks */
.dragon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dragon-basic-info {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.dragon-actions {
    display: flex;
    gap: 6px;
}

.dragon-stats-row {
    display: flex;
    gap: 12px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 60px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
}

.dragon-skills-preview {
    margin: 8px 0;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.skills-list {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.skill-tag {
    background: var(--skill-bg);
    border: 1px solid var(--skill-border);
    color: var(--ink);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.no-skills {
    color: var(--muted);
    font-size: 0.8rem;
    font-style: italic;
}

.dragon-management {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Battle Container */
.battle-container {
    max-width: 1200px;
    margin: 0 auto;
}

.battle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, var(--panel), var(--panel2));
    border: 1px solid var(--br);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.battle-info h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
}

.turn-indicator {
    font-size: 1rem;
    color: var(--brand);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeout-count {
    color: var(--warning);
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(245, 158, 11, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.weather-info {
    font-size: 0.9rem;
    color: var(--muted);
}

.team-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.team-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.count-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--ink);
}

.count-label {
    font-size: 0.8rem;
    color: var(--muted);
}

.vs-separator {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--gold);
}

/* Battle Field */
.battle-field {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: start;
}

.team-section {
    background: linear-gradient(180deg, var(--panel), var(--panel2));
    border: 1px solid var(--br);
    border-radius: 14px;
    padding: 16px;
}

.team-section h3 {
    margin: 0 0 12px 0;
    text-align: center;
    font-size: 1.1rem;
}

.dragon-lineup {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.battle-divider {
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--brand), transparent);
    min-height: 200px;
    align-self: stretch;
}

/* Battle Dragons */
.battle-dragon {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.1));
    transition: all 0.3s ease;
    cursor: pointer;
}

.battle-dragon:hover {
    border-color: var(--brand);
    background: linear-gradient(135deg, rgba(122, 166, 255, 0.1), rgba(0,0,0,0.1));
}

.battle-dragon.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(0,0,0,0.1));
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.battle-dragon.defeated {
    opacity: 0.5;
    filter: grayscale(70%);
}

.dragon-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid var(--br);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--panel), var(--panel2));
}

.dragon-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.active-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    border: 2px solid var(--panel);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.dragon-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dragon-name {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.9rem;
}

.dragon-level {
    font-size: 0.8rem;
    color: var(--muted);
}

.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.stat-bar {
    position: relative;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.bar-bg {
    width: 100%;
    height: 100%;
    background: var(--bar);
    border-radius: inherit;
}

.bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: inherit;
}

.bar-fill.hp {
    background: linear-gradient(90deg, var(--hp1), var(--hp2));
}

.bar-fill.mana {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.bar-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    font-weight: 600;
}

/* Status Effects */
.status-effects {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.status-effect {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.status-effect.status-burn {
    background: var(--hp1);
}

.status-effect.status-freeze {
    background: #0ea5e9;
}

.status-effect.status-poison {
    background: #16a34a;
}

.status-effect.status-stun {
    background: #a855f7;
}

/* Action Panel */
.action-panel {
    background: linear-gradient(180deg, var(--panel), var(--panel2));
    border: 1px solid var(--br);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.action-panel.waiting {
    text-align: center;
    padding: 32px 16px;
}

.waiting-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--br);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.action-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.action-stats {
    font-size: 0.9rem;
    color: var(--muted);
}

.turn-timer-display {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--timer-normal);
    background: rgba(34, 197, 94, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    transition: all 0.3s ease;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--panel), var(--panel2));
    color: var(--ink);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.action-btn:hover {
    border-color: var(--brand);
    background: linear-gradient(135deg, rgba(122, 166, 255, 0.1), var(--panel));
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-label {
    font-size: 0.9rem;
}

.sub-action-panel {
    min-height: 60px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px;
}

/* Target Selection */
.target-selection h4 {
    margin: 0 0 12px 0;
    color: var(--brand);
    text-align: center;
}

.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.target-btn {
    background: linear-gradient(135deg, var(--panel), var(--panel2));
    border: 1px solid var(--br);
    border-radius: 8px;
    padding: 12px;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s ease;
}

.target-btn:hover {
    border-color: var(--brand);
    background: linear-gradient(135deg, rgba(122, 166, 255, 0.1), var(--panel));
}

.target-name {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.target-hp {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Skill Selection */
.skill-selection h4 {
    margin: 0 0 12px 0;
    color: var(--brand);
    text-align: center;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.skill-btn {
    background: linear-gradient(135deg, var(--skill-bg), var(--panel2));
    border: 1px solid var(--skill-border);
    border-radius: 8px;
    padding: 12px;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.skill-btn:hover:not(.disabled) {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--skill-hover), var(--panel));
}

.skill-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.skill-name {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.skill-cost {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 2px;
}

.cooldown {
    display: block;
    font-size: 0.75rem;
    color: var(--error);
    font-weight: 600;
}

/* Battle Log */
.battle-log {
    background: linear-gradient(180deg, var(--panel), var(--panel2));
    border: 1px solid var(--br);
    border-radius: 14px;
    padding: 16px;
}

.battle-log h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
}

.log-content {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px;
}

.log-entry {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.combat {
    color: var(--error);
}

.log-entry.heal {
    color: var(--ok);
}

.log-entry.skill {
    color: var(--brand);
}

.log-entry.critical {
    color: var(--gold);
    font-weight: 700;
}

.log-entry.timeout {
    color: var(--warning);
    font-weight: 700;
}

.log-entry.system {
    color: var(--muted);
    font-style: italic;
}

/* Timeout Warning */
.timeout-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--timeout-bg);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.timeout-warning.show {
    opacity: 1;
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.warning-icon {
    font-size: 1.5rem;
    animation: pulse 1s infinite;
}

.warning-text {
    font-weight: 700;
}

/* Battle Result Modal */
.battle-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.battle-result-overlay.show {
    opacity: 1;
}

.battle-result-modal {
    background: var(--panel);
    border: 1px solid var(--br);
    border-radius: 16px;
    padding: 20px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 12px;
}

.result-header.victory {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.result-header.defeat {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.result-header.draw {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.result-title {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
}

.result-subtitle {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
}

.result-content {
    margin-bottom: 20px;
}

.battle-stats {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.battle-stats h4 {
    margin: 0 0 8px 0;
    color: var(--brand);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.rewards-section {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
}

.rewards-section h4 {
    margin: 0 0 8px 0;
    color: var(--ok);
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.reward-item {
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.reward-item.xp {
    border-left: 3px solid var(--ok);
}

.reward-item.gold {
    border-left: 3px solid var(--gold);
}

.reward-item.skill-xp {
    border-left: 3px solid var(--brand);
}

.reward-icon {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.reward-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}

.encouragement-section {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
}

.encouragement-section h4 {
    margin: 0 0 8px 0;
    color: var(--warning);
}

.encouragement-text {
    margin: 0 0 12px 0;
    font-style: italic;
    color: var(--muted);
}

.improvement-tips h5 {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    color: var(--ink);
}

.improvement-tips ul {
    margin: 0;
    padding-left: 16px;
}

.improvement-tips li {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 2px;
}

.team-status {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.team-status h4 {
    margin: 0 0 8px 0;
    color: var(--brand);
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.team-column h5 {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    color: var(--ink);
}

.dragon-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dragon-status:last-child {
    border-bottom: none;
}

.dragon-status.defeated {
    opacity: 0.6;
}

.dragon-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.dragon-hp {
    font-size: 0.8rem;
    color: var(--muted);
}

.result-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.claim-btn {
    background: linear-gradient(180deg, var(--gold), #d97706);
    color: #1b1500;
}

/* Skill Management Container */
.skill-management-container {
    max-width: 1000px;
    margin: 0 auto;
}

.dragon-skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.dragon-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dragon-element-icon {
    font-size: 2rem;
}

.dragon-details h3 {
    margin: 0;
    font-size: 1.5rem;
}

.dragon-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.dragon-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Current Skills Grid */
.current-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.skill-card {
    background: var(--skill-bg);
    border: 1px solid var(--skill-border);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s ease;
}

.skill-card:hover {
    border-color: var(--brand);
    background: var(--skill-hover);
    transform: translateY(-1px);
}

.skill-card.current-skill {
    border-left: 4px solid var(--brand);
}

.skill-card.compatible-skill {
    border-left: 4px solid var(--gold);
    opacity: 0.8;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.skill-header h5, .skill-header h6 {
    margin: 0;
    font-size: 1rem;
    color: var(--ink);
}

.skill-level {
    background: var(--brand);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.skill-rarity {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.skill-rarity.common { background: var(--skill-common); color: white; }
.skill-rarity.rare { background: var(--skill-rare); color: white; }
.skill-rarity.epic { background: var(--skill-epic); color: white; }
.skill-rarity.legendary { background: var(--skill-legendary); color: black; }
.skill-rarity.mythic { background: var(--skill-mythic); color: white; }

.skill-body {
    margin: 8px 0;
}

.skill-description {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 8px;
    line-height: 1.4;
}

.skill-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.skill-stat {
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--muted);
}

.skill-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: flex-end;
}

.max-level {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 8px;
}

/* Compatible Skills Grid */
.compatible-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

/* Skill Book Cards */
.skill-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.skill-book-card {
    background: var(--skill-bg);
    border: 1px solid var(--skill-border);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.skill-book-card:hover {
    border-color: var(--brand);
    background: var(--skill-hover);
    transform: translateY(-1px);
}

.book-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.book-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--ink);
}

.book-body {
    margin: 8px 0;
}

.compatible-dragons {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--skill-border);
}

.book-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Skill Teaching Modal */
.skill-teaching-modal {
    max-width: 500px;
    margin: 20vh auto;
}

.dragon-selection {
    margin: 16px 0;
}

.dragon-select-btn {
    width: 100%;
    margin-bottom: 8px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--skill-bg);
    border: 1px solid var(--skill-border);
    color: var(--ink);
}

.dragon-select-btn:hover {
    background: var(--skill-hover);
    border-color: var(--brand);
}

.dragon-select-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dragon-element {
    font-size: 0.8rem;
    color: var(--muted);
}

.dragon-level {
    font-size: 0.75rem;
    color: var(--gold);
}

.current-skills {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Market Tabs */
.market-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--panel2);
    padding: 4px;
    border-radius: 12px;
}

.tab-button {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.tab-button:hover {
    background: rgba(122, 166, 255, 0.1);
    color: var(--brand);
}

.tab-button.active {
    background: var(--brand);
    color: white;
}

.tab-icon {
    font-size: 1.2rem;
}

/* Market Filters */
.market-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--panel2);
    padding: 12px;
    border-radius: 12px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}

.filter-group select {
    background: var(--panel);
    border: 1px solid var(--br);
    color: var(--ink);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Skill Element Sections */
.skill-element-section {
    margin-bottom: 24px;
}

.skill-element-section h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal Enhancements */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--panel);
    border: 1px solid var(--br);
    border-radius: 16px;
    padding: 20px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.modal-close:hover {
    color: var(--ink);
    background: rgba(255,255,255,0.1);
}

.modal-header {
    margin-bottom: 16px;
    text-align: center;
}

.modal-body {
    margin-bottom: 16px;
}

.modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Skill Modal Specific */
.skill-book-modal {
    max-width: 500px;
}

.book-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.skill-stats-detailed {
    margin: 12px 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.compatible-dragons-list {
    margin-top: 12px;
}

.compatible-dragons-list h5 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

.dragon-names {
    font-size: 0.8rem;
    color: var(--ink);
    line-height: 1.4;
}

/* Element Colors */
.element-fire, .element-ates { color: #f97316; }
.element-water, .element-su { color: #3b82f6; }
.element-earth, .element-toprak { color: #84cc16; }
.element-wind, .element-ruzgar { color: #06b6d4; }
.element-light, .element-isik { color: #fbbf24; }
.element-dark, .element-karanlik { color: #a855f7; }
.element-ice, .element-buzul { color: #0ea5e9; }

/* Rarity Colors */
.rarity-common { color: #9ca3af; }
.rarity-rare { color: #3b82f6; }
.rarity-epic { color: #a855f7; }
.rarity-legendary { color: #f59e0b; }
.rarity-mythic { color: #ef4444; }

/* Center Layout */
.center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Info Boxes */
.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--brand);
    font-size: 0.9rem;
}

.warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--gold);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

/* Form Elements */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--br);
    border-radius: 12px;
    background: var(--panel);
    color: var(--ink);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(122, 166, 255, 0.1);
}

.form-input::placeholder {
    color: var(--muted);
}

/* Level Requirements */
.level-requirement {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--gold);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--panel);
    border: 1px solid var(--br);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--ink);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    border-color: var(--error);
    background: linear-gradient(135deg, #2d1b1b, var(--panel));
}

.notification.success {
    border-color: var(--ok);
    background: linear-gradient(135deg, #1b2d1b, var(--panel));
}

.notification.warning {
    border-color: var(--warning);
    background: linear-gradient(135deg, #2d2b1b, var(--panel));
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--muted);
    font-size: 1.1rem;
}

/* Additional Market Styles */
.market-container {
    max-width: 1200px;
    margin: 0 auto;
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.market-title h2 {
    margin: 0;
    font-size: 1.8rem;
}

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.market-resources {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.resource-display {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--panel2);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--br);
}

.resource-icon {
    font-size: 1.1rem;
}

.resource-value {
    font-weight: 700;
    color: var(--ink);
}

.market-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--br);
}

/* Owned indicators */
.owned-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--ok);
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

.owned-text {
    color: var(--ok);
    font-weight: 600;
    font-size: 0.8rem;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.lock-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

.lock-text {
    font-size: 0.8rem;
    color: var(--muted);
}

/* No compatible skills */
.no-compatible {
    color: var(--muted);
    font-style: italic;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .topbar {
        flex-direction: column;
        gap: 8px;
    }
    
    .bars {
        min-width: auto;
        max-width: none;
    }
    
    .row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .dragon-visual {
        width: 100%;
        max-width: 200px;
    }
    
    .dragon-header {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .dragon-stats-row {
        justify-content: space-between;
    }
    
    .current-skills-grid, .compatible-skills-grid, .skill-book-grid {
        grid-template-columns: 1fr;
    }
    
    .dragon-skill-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .skill-stats {
        justify-content: center;
    }
    
    .market-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .market-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    /* Battle Mobile Optimizations */
    .battle-field {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .battle-divider {
        display: none;
    }
    
    .battle-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .target-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-grid {
        grid-template-columns: 1fr;
    }
    
    .timeout-warning {
        font-size: 1rem;
        padding: 12px 16px;
    }
    
    .battle-result-modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

/* Android/WebView specific optimizations */
@media (max-width: 768px) and (orientation: portrait) {
    :root {
        --font-size-base: 16px;
        --touch-target: 48px;
    }
    
    /* Larger touch targets for mobile */
    .btn, .item, .dragon-card, .skill-slot {
        min-height: var(--touch-target);
        min-width: var(--touch-target);
        padding: 12px 16px;
    }
    
    /* Improved mobile spacing */
    .container {
        margin: 8px;
    }
    
    /* Better mobile readability */
    .small {
        font-size: 14px;
        line-height: 1.4;
    }
    
    /* Mobile-optimized modals */
    .modal {
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Landscape mobile optimization */
@media (max-width: 1024px) and (orientation: landscape) {
    .topbar {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .container {
        max-height: calc(100vh - 60px);
    }
}

/* Android WebView specific */
@media screen and (-webkit-min-device-pixel-ratio: 1.5) {
    /* High DPI Android devices */
    .dragon-visual, .icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Performance optimizations for low-end devices */
@media (max-device-width: 480px) and (max-device-memory: 1) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .gradient-bg, .skill-glow {
        background: var(--panel) !important;
    }
    
    .particle-effect {
        display: none !important;
    }
}

/* ============================================
   NEW VILLAGE TAB SYSTEM STYLES
   ============================================ */

/* Top Bar Styles */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-dark);
    padding: 12px 20px;
    border-bottom: 2px solid var(--br);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.village-name h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.4rem;
}

.player-info {
    color: var(--muted);
    font-size: 0.9rem;
}

.resources-bar {
    display: flex;
    gap: 20px;
}

.resources-bar .resource-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: var(--gradient-panel);
    border-radius: 8px;
    border: 1px solid var(--br);
}

.resource-name {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 2px;
}

.resource-value {
    font-weight: bold;
    color: var(--ink);
    font-size: 0.95rem;
}

.top-actions .btn-settings {
    padding: 8px 16px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.top-actions .btn-settings:hover {
    background: var(--brand-dark);
}

/* XP Bar Styles */
.xp-bar-container {
    padding: 10px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--br);
}

.xp-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--muted);
}

.xp-bar {
    height: 6px;
    background: var(--bar);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.xp-fill {
    height: 100%;
    background: var(--gradient-gold);
    transition: width 0.3s ease;
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    background: var(--panel2);
    border-bottom: 2px solid var(--br);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: var(--panel);
    color: var(--ink);
}

.tab-btn.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    background: var(--panel);
}

/* Tab Content Styles */
.tab-content {
    padding: 20px;
    background: var(--bg);
    min-height: calc(100vh - 200px);
}

/* Home Tab Styles */
.home-tab .welcome-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--gradient-card);
    border-radius: 12px;
    border: 1px solid var(--br);
}

.home-tab .welcome-section h2 {
    color: var(--ink);
    margin-bottom: 8px;
}

.home-tab .welcome-section p {
    color: var(--muted);
    margin: 0;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--gradient-panel);
    border: 1px solid var(--br);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.stat-card h3 {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 8px 0;
}

.stat-value {
    color: var(--ink);
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-detail {
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.quick-actions h3 {
    color: var(--ink);
    margin-bottom: 15px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: var(--gradient-card);
    border: 1px solid var(--br);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border-color: var(--brand);
}

.action-title {
    color: var(--ink);
    font-weight: bold;
    margin-bottom: 5px;
}

.action-desc {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Dragons Tab Styles */
.dragons-tab .empty-state {
    text-align: center;
    padding: 40px 20px;
}

.dragons-tab .empty-state h3 {
    color: var(--ink);
    margin-bottom: 10px;
}

.dragons-tab .empty-state p {
    color: var(--muted);
    margin-bottom: 20px;
}

.dragon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dragon-header h2 {
    color: var(--ink);
    margin: 0;
}

.dragon-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.dragon-card {
    background: var(--gradient-card);
    border: 1px solid var(--br);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.2s;
}

.dragon-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}

.dragon-info h3 {
    color: var(--ink);
    margin: 0 0 5px 0;
}

.dragon-element {
    color: var(--brand);
    font-size: 0.9rem;
    margin: 0;
}

.dragon-level {
    color: var(--muted);
    font-size: 0.8rem;
    margin: 5px 0 10px 0;
}

.dragon-stats {
    display: flex;
    gap: 15px;
}

.dragon-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dragon-stats .label {
    color: var(--muted);
    font-size: 0.8rem;
}

.dragon-stats .value {
    color: var(--ink);
    font-weight: bold;
}

/* Chat Tab Styles */
.chat-area {
    background: var(--panel);
    border-radius: 10px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.system-message {
    color: var(--muted);
    text-align: center;
    font-style: italic;
    padding: 20px;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid var(--br);
}

.chat-input input {
    flex: 1;
    padding: 8px 12px;
    background: var(--panel2);
    border: 1px solid var(--br);
    border-radius: 6px;
    color: var(--ink);
}

/* Settings Tab Styles */
.settings-content {
    max-width: 600px;
}

.setting-group {
    background: var(--gradient-card);
    border: 1px solid var(--br);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.setting-group h3 {
    color: var(--ink);
    margin: 0 0 15px 0;
}

.setting-group label {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
    cursor: pointer;
}

.setting-group input[type="checkbox"] {
    margin-right: 8px;
}

.btn-danger {
    background: var(--error);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.empty-state h3 {
    color: var(--ink);
    margin-bottom: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .resources-bar {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .dragon-list {
        grid-template-columns: 1fr;
    }
}

/* Notification System Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 12px 16px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideInRight 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.notification-info {
    background: var(--brand);
}

.notification-success {
    background: var(--success);
}

.notification-error {
    background: var(--error);
}

.notification-warning {
    background: var(--warning);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Character Creation Styles */
.character-creation {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.creation-header h1 {
    color: var(--ink);
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.creation-header p {
    color: var(--muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.creation-form {
    background: var(--gradient-card);
    border: 1px solid var(--br);
    border-radius: 12px;
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: var(--ink);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: var(--panel2);
    border: 1px solid var(--br);
    border-radius: 6px;
    color: var(--ink);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-disabled {
    background: var(--muted);
    color: var(--panel);
    cursor: not-allowed;
}

.btn-disabled:hover {
    background: var(--muted);
    transform: none;
}

/* Main Menu Styles */
.main-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--gradient-dark);
}

.menu-header {
    text-align: center;
    margin-bottom: 40px;
}

.game-title {
    font-size: 3.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--gold), var(--brand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.game-subtitle {
    color: var(--muted);
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.8;
}

.menu-options {
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

.save-slot, .empty-slot {
    background: var(--gradient-card);
    border: 1px solid var(--br);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.slot-header {
    color: var(--brand);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.slot-info {
    margin-bottom: 20px;
}

.player-name {
    color: var(--ink);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.player-details {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.last-played {
    color: var(--muted);
    font-size: 0.8rem;
    opacity: 0.7;
}

.slot-message {
    color: var(--muted);
    font-style: italic;
}

.menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-continue {
    background: var(--gradient-gold);
    color: var(--panel);
    font-weight: bold;
    font-size: 1.1rem;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--glow-gold);
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.btn-new-game {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-new-game:hover {
    transform: translateY(-1px);
    box-shadow: var(--glow-brand);
}

.btn-delete {
    background: var(--error);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    opacity: 0.8;
}

.btn-delete:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: var(--glow-error);
}

.menu-footer {
    text-align: center;
    color: var(--muted);
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Mobile Menu Adjustments */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .main-menu {
        padding: 15px;
    }
    
    .menu-options {
        max-width: 100%;
    }
}

/* Touch-specific styles */
@media (pointer: coarse) {
    /* Larger interactive elements for touch */
    .item:hover, .btn:hover {
        background: var(--panel2);
        transform: none;
    }
    
    .item:active, .btn:active {
        background: var(--brand);
        color: var(--bg);
    }
    
    /* Remove hover states that don't work on touch */
    .dragon-card:hover {
        transform: none;
    }
    
    .skill-slot:hover {
        transform: none;
    }
}

/* Reduce motion for battery saving */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode for accessibility */
@media (prefers-contrast: high) {
    :root {
        --bg: #000000;
        --ink: #ffffff;
        --brand: #00ffff;
        --gold: #ffff00;
        --error: #ff0000;
        --ok: #00ff00;
    }
    
    .btn, .item, .card {
        border: 2px solid var(--ink);
    }
}

/* Dark mode optimizations (for system settings) */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but ensure consistency */
    meta[name="theme-color"] {
        content: var(--bg);
    }
}

/* Village System Styles */
.village-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.village-header {
    background: linear-gradient(135deg, var(--panel), var(--panel2));
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--br);
}

.village-title h2 {
    margin: 0 0 8px 0;
    color: var(--brand);
    font-weight: 800;
}

.village-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-beauty {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: var(--bg);
}

.pill-buildings {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    color: white;
}

.village-resources {
    margin-top: 16px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.resource-item {
    background: rgba(122, 166, 255, 0.1);
    border: 1px solid rgba(122, 166, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.resource-item:hover {
    background: rgba(122, 166, 255, 0.15);
    border-color: rgba(122, 166, 255, 0.4);
}

.resource-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.resource-amount {
    font-weight: 700;
    color: var(--ink);
    font-size: 16px;
}

.resource-rate {
    font-size: 12px;
    color: var(--ok);
    margin-top: 2px;
}

.village-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

.village-grid-container {
    background: var(--panel);
    border: 1px solid var(--br);
    border-radius: 12px;
    padding: 20px;
}

.building-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.village-grid {
    border: 2px solid var(--br);
    border-radius: 8px;
    padding: 8px;
    background: var(--panel2);
    overflow: auto;
    max-width: 100%;
}

.grid-row {
    display: flex;
}

.grid-cell {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 24px;
    background: var(--panel);
}

.grid-cell:hover {
    background: var(--brand);
    color: var(--bg);
}

.grid-cell.has-building {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-color: #22c55e;
}

.grid-cell.valid-placement {
    background: rgba(34, 197, 94, 0.3);
    border-color: #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.village-panels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.village-panel {
    background: var(--panel);
    border: 1px solid var(--br);
    border-radius: 12px;
    padding: 16px;
}

.village-panel h3 {
    margin: 0 0 12px 0;
    color: var(--brand);
    font-weight: 700;
    font-size: 16px;
}

.dragon-summary {
    margin-bottom: 12px;
}

.dragon-count {
    font-weight: 600;
    margin-bottom: 8px;
}

.dragon-preview {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.mini-dragon {
    width: 32px;
    height: 32px;
    background: var(--panel2);
    border: 1px solid var(--br);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.panel-actions, .activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-list .btn:first-child {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
    font-weight: bold;
    border: none;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.activity-list .btn:first-child:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
}

.construction-queue, .breeding-queue {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.construction-item, .breeding-item {
    background: var(--panel2);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid var(--br);
}

.construction-info, .breeding-parents {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.construction-name {
    font-weight: 600;
}

.construction-time, .breeding-time {
    font-size: 12px;
    color: var(--muted);
}

.construction-progress, .breeding-progress {
    margin-top: 8px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.construction-more {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 8px;
}

/* Building Menu Modal */
.building-menu {
    max-width: 800px;
    max-height: 80vh;
}

.building-category {
    margin-bottom: 20px;
}

.building-category h4 {
    color: var(--brand);
    margin-bottom: 12px;
    font-weight: 700;
    border-bottom: 1px solid var(--br);
    padding-bottom: 4px;
}

.building-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.building-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--panel2);
    border: 1px solid var(--br);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.building-option:hover:not(.disabled) {
    background: var(--brand);
    color: var(--bg);
    border-color: var(--brand);
}

.building-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.building-icon {
    font-size: 32px;
    width: 48px;
    text-align: center;
}

.building-info {
    flex: 1;
}

.building-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.building-description {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 4px;
}

.building-cost {
    font-size: 12px;
    color: var(--warning);
    font-weight: 600;
}

/* Building Options Modal */
.building-options {
    max-width: 500px;
}

.building-details {
    margin-bottom: 20px;
}

.building-level {
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 8px;
}

.building-production, .building-effects {
    margin-top: 16px;
    padding: 12px;
    background: var(--panel2);
    border-radius: 8px;
    border: 1px solid var(--br);
}

.building-production h4, .building-effects h4 {
    margin: 0 0 8px 0;
    color: var(--ok);
    font-size: 14px;
}

.building-production div, .building-effects div {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 2px;
}

.building-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Enhanced Building Information Styles */
.production-info {
    background: linear-gradient(145deg, #e8f5e8, #f0f8f0);
    border: 1px solid #4CAF50;
    border-radius: 8px;
    padding: 10px;
    margin: 8px 0;
}

.production-item {
    display: inline-block;
    margin: 2px 0;
    padding: 3px 8px;
    background: #4CAF50;
    color: white;
    border-radius: 15px;
    font-size: 12px;
}

.building-cost {
    background: linear-gradient(145deg, #fff3e0, #ffecd9);
    border: 1px solid #FF9800;
    border-radius: 8px;
    padding: 10px;
    margin: 8px 0;
}

.cost-item {
    display: block;
    margin: 4px 0;
    padding: 5px;
    border-radius: 5px;
    font-size: 13px;
}

.cost-item.affordable {
    background: #c8e6c9;
    color: #2e7d32;
}

.cost-item.expensive {
    background: #ffcdd2;
    color: #c62828;
}

.current-amount {
    font-size: 11px;
    opacity: 0.8;
}

.build-time {
    background: #e3f2fd;
    border: 1px solid #2196F3;
    border-radius: 5px;
    padding: 5px;
    margin: 5px 0;
    font-size: 12px;
    color: #1976d2;
}

/* Building Selection Screen Styles */
.building-selection-screen {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.screen-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--br);
}

.btn-back {
    background: var(--button);
    color: var(--text);
    border: 1px solid var(--br);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--button-hover);
    transform: translateX(-2px);
}

.building-categories {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.build-system {
    padding: 20px;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.build-system h2 {
    color: var(--accent);
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
}

.buildings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.building-costs {
    margin: 15px 0;
}

.building-costs h5 {
    color: var(--accent);
    font-size: 14px;
    margin-bottom: 8px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    font-size: 13px;
    color: var(--text);
}

.cost-available {
    color: #4CAF50;
}

.cost-insufficient {
    color: #f44336;
}

.building-requirements {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--br);
}

.building-requirements p {
    color: #ff9800;
    font-size: 12px;
    margin: 0;
}

.building-category h3 {
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--br);
}

.building-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.building-card {
    background: var(--panel2);
    border: 1px solid var(--br);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.building-card.can-build {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.building-card.cannot-build {
    border-color: #f44336;
    opacity: 0.7;
}

.building-card:hover.can-build {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.building-card h4 {
    color: var(--accent);
    font-size: 16px;
    margin-bottom: 10px;
}

.building-desc {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.building-size, .build-time {
    font-size: 12px;
    color: var(--text);
    margin: 5px 0;
}

.requirement-not-met {
    color: #f44336;
    font-size: 12px;
    font-weight: bold;
    margin: 5px 0;
}

.building-prereq.met {
    color: #4CAF50;
    font-size: 12px;
    margin: 5px 0;
}

.building-prereq.not-met {
    color: #f44336;
    font-size: 12px;
    margin: 5px 0;
}

.available-plots {
    font-size: 11px;
    color: var(--muted);
    margin-left: 10px;
}

/* Breeding Center Modal */
.breeding-center {
    max-width: 600px;
    max-height: 80vh;
}

.active-breeding {
    margin-bottom: 20px;
}

.active-breeding h4 {
    color: var(--brand);
    margin-bottom: 12px;
}

.breeding-parents {
    text-align: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.start-breeding {
    background: var(--panel2);
    border: 1px solid var(--br);
    border-radius: 8px;
    padding: 16px;
}

.start-breeding h4 {
    color: var(--brand);
    margin: 0 0 12px 0;
}

.breeding-cost {
    color: var(--warning);
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 600;
}

.dragon-pair {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.dragon-selector {
    flex: 1;
}

.dragon-selector label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--muted);
}

.dragon-selector select {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--br);
    color: var(--ink);
    padding: 8px;
    border-radius: 6px;
}

.breeding-unavailable {
    text-align: center;
    color: var(--muted);
    padding: 20px;
    background: var(--panel2);
    border-radius: 8px;
    border: 1px solid var(--br);
}

/* Modal Improvements */
.modal {
    background: var(--panel);
    border: 2px solid var(--brand);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background: linear-gradient(135deg, var(--brand), #6366f1);
    color: var(--bg);
    padding: 16px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -1px -1px 16px -1px;
}

.modal-header h3 {
    margin: 0;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design for Village */
@media (max-width: 768px) {
    .village-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .resource-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .village-header {
        padding: 16px;
    }
    
    .village-info {
        flex-direction: column;
        gap: 4px;
    }
    
    .building-controls {
        flex-direction: column;
    }
    
    .grid-cell {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .dragon-pair {
        flex-direction: column;
        gap: 12px;
    }
    
    .building-option {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .building-actions {
        justify-content: center;
    }
}

/* Android Specific Optimizations */

/* Android WebView Optimization */
@supports (-webkit-overflow-scrolling: touch) {
    * {
        /* Better scroll performance */
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Optimize animations for Android */
    .btn, .item, .card {
        will-change: transform;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* Android Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Android High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --bg: #000000;
        --panel: #1a1a1a;
        --ink: #ffffff;
        --brand: #00aaff;
        --gold: #ffff00;
        --br: #666666;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Touch-specific optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        /* Larger touch targets for fingers */
        min-height: var(--touch-target-size);
        padding: 14px 18px;
    }
    
    .item {
        min-height: var(--touch-target-size);
        padding: 12px;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover,
    .item:hover {
        transform: none;
    }
    
    /* Better tap feedback */
    .btn:active,
    .item:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Android dark theme support */
@media (prefers-color-scheme: dark) {
    :root {
        /* Already dark themed, but ensure compatibility */
        color-scheme: dark;
    }
}

/* Performance optimization for low-end Android devices */
@media (max-device-width: 480px) and (-webkit-device-pixel-ratio: 1) {
    /* Simpler gradients for low-end devices */
    .card, .card2 {
        background: var(--panel);
    }
    
    h1 {
        background: var(--brand);
        -webkit-background-clip: unset;
        -webkit-text-fill-color: unset;
        color: var(--brand);
    }
    
    /* Disable expensive effects */
    .btn {
        box-shadow: none;
    }
    
    .btn:hover:not(:disabled) {
        box-shadow: none;
    }
}

/* Android Navigation Bar accommodation */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }
}

/* Screen Reader and TalkBack improvements */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus improvements for TalkBack */
*:focus-visible {
    outline: 3px solid var(--brand) !important;
    outline-offset: 2px !important;
    border-radius: 4px !important;
}

/* Skip to main content link */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--brand);
    color: var(--bg);
    padding: 8px;
    text-decoration: none;
    font-weight: bold;
    z-index: 100000;
    border-radius: 4px;
}

.skip-nav:focus {
    top: 6px;
}

/* Android Notification Style */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 300px;
}

.notification {
    background: var(--panel);
    border: 1px solid var(--br);
    border-radius: var(--android-border-radius);
    padding: 12px 16px;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
}

.notification.success { border-left: 4px solid var(--ok); }
.notification.warning { border-left: 4px solid var(--warning); }
.notification.error { border-left: 4px solid var(--error); }

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Premium Visual Effects & Animations */

/* Premium Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

/* Shimmer Effect for Special Items */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* Glow Pulse Animation */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: var(--glow-brand);
    }
    50% {
        box-shadow: 
            var(--glow-brand),
            0 0 30px rgba(99, 102, 241, 0.5);
    }
}

.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

/* Premium Particle Background Effect */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: particle-float 20s infinite linear;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(200px) rotate(360deg);
        opacity: 0;
    }
}

/* Premium Card Hover Effects */
.card-premium {
    background: 
        linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%),
        var(--gradient-card);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    margin: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand), var(--brand-light), var(--gems));
}

.card-premium:hover {
    transform: translateY(-5px) scale(1.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(99, 102, 241, 0.4);
}

/* Resource Counter Animations */
.resource-counter {
    display: inline-block;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.resource-increase {
    animation: resource-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes resource-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        color: var(--success);
        text-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    }
    100% {
        transform: scale(1);
    }
}

/* Dragon Card Premium Effects */
.dragon-card-premium {
    position: relative;
    background: var(--gradient-card);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dragon-card-premium::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--brand), var(--gems), var(--gold));
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.dragon-card-premium:hover::before {
    opacity: 1;
}

.dragon-card-premium:hover {
    transform: translateY(-8px) rotateY(5deg);
    box-shadow: 
        0 40px 100px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(99, 102, 241, 0.4);
}

/* Battle Effect Animations */
@keyframes battle-strike {
    0% { transform: translateX(0) scale(1); }
    20% { transform: translateX(-10px) scale(1.1); }
    40% { transform: translateX(10px) scale(1.05); }
    60% { transform: translateX(-5px) scale(1.02); }
    80% { transform: translateX(5px) scale(1.01); }
    100% { transform: translateX(0) scale(1); }
}

.battle-strike {
    animation: battle-strike 0.6s ease-out;
}

/* Level Up Animation */
@keyframes level-up {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) rotateZ(5deg);
        opacity: 0.8;
        color: var(--gold);
        text-shadow: 0 0 30px rgba(251, 191, 36, 0.8);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.level-up {
    animation: level-up 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Success Celebration Effect */
@keyframes celebrate {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

.celebrate {
    animation: celebrate 0.8s ease-in-out;
}

/* Premium Loading Animation */
@keyframes premium-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.premium-loading {
    background: linear-gradient(
        90deg,
        var(--panel) 25%,
        var(--brand) 50%,
        var(--panel) 75%
    );
    background-size: 200% 100%;
    animation: premium-loading 1.5s infinite;
    border-radius: 8px;
}

/* Floating UI Elements */
.float-gentle {
    animation: float 6s ease-in-out infinite;
}

.float-fast {
    animation: float 3s ease-in-out infinite;
}

/* Premium Typography Effects */
.text-glow {
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.text-gold-gradient {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

/* Icon System & Visual Assets */

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}

.icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.icon.small {
    width: 16px;
    height: 16px;
}

.icon.medium {
    width: 24px;
    height: 24px;
}

.icon.large {
    width: 32px;
    height: 32px;
}

.icon.xl {
    width: 48px;
    height: 48px;
}

/* Resource Display Components */
.resource-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.9rem;
}

.resource-display.gold {
    color: var(--gold);
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.1);
}

.resource-display.gems {
    color: var(--gems);
    border-color: rgba(6, 214, 160, 0.3);
    background: rgba(6, 214, 160, 0.1);
}

.resource-display.ingot {
    color: var(--ingot);
    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.1);
}

.resource-amount {
    font-weight: 700;
    text-shadow: 0 0 10px currentColor;
}

/* Element-themed Icons */
.icon.element-fire {
    color: #ff4444;
    filter: drop-shadow(0 0 6px rgba(255, 68, 68, 0.3));
}

.icon.element-water {
    color: #4488ff;
    filter: drop-shadow(0 0 6px rgba(68, 136, 255, 0.3));
}

.icon.element-earth {
    color: #88cc44;
    filter: drop-shadow(0 0 6px rgba(136, 204, 68, 0.3));
}

.icon.element-wind {
    color: #44cccc;
    filter: drop-shadow(0 0 6px rgba(68, 204, 204, 0.3));
}

.icon.element-light {
    color: #ffdd44;
    filter: drop-shadow(0 0 6px rgba(255, 221, 68, 0.3));
}

.icon.element-dark {
    color: #8844cc;
    filter: drop-shadow(0 0 6px rgba(136, 68, 204, 0.3));
}

.icon.element-ice {
    color: #88ccff;
    filter: drop-shadow(0 0 6px rgba(136, 204, 255, 0.3));
}

/* Dragon Sprites */
.dragon-sprite {
    display: inline-block;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.dragon-sprite:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.dragon-sprite svg {
    width: 100%;
    height: 100%;
}

/* Element Particles for Enhanced Visuals */
.element-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particle-float 20s linear infinite;
}

/* Icon Button Combinations */
.btn.with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn.with-icon .icon {
    width: 20px;
    height: 20px;
}

/* Interactive Icon Effects */
.icon.interactive {
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon.interactive:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.icon.interactive:active {
    transform: scale(0.95);
}

/* Status Icons */
.icon.status-active {
    color: var(--success);
    animation: glow-pulse 2s ease-in-out infinite;
}

.icon.status-inactive {
    color: var(--muted);
    opacity: 0.6;
}

.icon.status-warning {
    color: var(--warning);
    animation: warning-blink 1s ease-in-out infinite alternate;
}

@keyframes warning-blink {
    from {
        opacity: 1;
    }
    to {
        opacity: 0.5;
    }
}

/* Resource Collection Animation */
.resource-collect-animation {
    animation: resource-collect 1s ease-out forwards;
}

@keyframes resource-collect {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) translateY(-20px);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) translateY(-40px);
        opacity: 0;
    }
}

/* Settings Screen Styles */

.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, var(--panel), var(--panel2));
    border-radius: 12px;
    border: 2px solid var(--brand);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
}

.settings-container h2 {
    color: var(--brand-light);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.settings-section {
    background: var(--panel2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--brand-dark);
}

.settings-section h3 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--panel);
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.setting-item label {
    display: block;
    color: var(--ink);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.volume-control input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--panel2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--brand);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
    transition: all 0.2s ease;
}

.volume-control input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--brand-light);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.6);
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--brand);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

.volume-value {
    color: var(--brand-light);
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    background: var(--panel2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--brand);
}

.setting-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.toggle-item {
    background: var(--panel);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.2s ease;
}

.toggle-item:hover {
    border-color: var(--brand);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.toggle-item label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
}

.toggle-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand);
    cursor: pointer;
}

.toggle-label {
    color: var(--ink);
    font-weight: 500;
}

.audio-test-section {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--panel);
    border-radius: 6px;
    border: 1px solid var(--gold);
}

.audio-test-section h4 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.test-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.test-buttons .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.test-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.warning-text {
    color: var(--hp1);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.settings-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--brand-dark);
}

.settings-actions .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.settings-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Button Info Style */
.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496, #0f6674);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .volume-control {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .setting-toggles {
        grid-template-columns: 1fr;
    }
    
    .test-buttons {
        grid-template-columns: 1fr;
    }
    
    .settings-actions {
        flex-direction: column;
    }
}

/* Android-Style Bottom Navigation Tabs */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gradient-panel);
    border-top: 2px solid var(--br);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 12px;
    min-width: 60px;
    cursor: pointer;
    position: relative;
}

.nav-tab:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--brand-light);
    transform: translateY(-2px);
}

.nav-tab.active {
    color: var(--brand);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: var(--glow-brand);
}

.nav-tab.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--brand);
    border-radius: 0 0 3px 3px;
    box-shadow: var(--glow-brand);
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
    line-height: 1;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Tab Content Styling */
.tab-content {
    padding: 20px;
    padding-bottom: 80px; /* Space for bottom navigation */
    min-height: calc(100vh - 80px);
    background: var(--gradient-dark);
}

.tab-content .header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--gradient-card);
    border-radius: 16px;
    border: 1px solid var(--br);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tab-content .header h1 {
    color: var(--ink);
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Game Tab Styling */
.game-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.game-actions .btn {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Clan Tab Styling */
.clan-info {
    display: grid;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.clan-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.clan-info ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
}

.clan-info li {
    padding: 8px 0;
    color: var(--muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-info li:last-child {
    border-bottom: none;
}

/* Chat Tab Styling */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.chat-channels {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--br);
    padding-bottom: 12px;
}

.chat-channel {
    padding: 8px 16px;
    background: var(--panel2);
    border: 1px solid var(--br);
    border-radius: 20px;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-channel:hover {
    background: var(--panel);
    color: var(--ink);
}

.chat-channel.active {
    background: var(--brand);
    color: white;
    box-shadow: var(--glow-brand);
}

.chat-messages {
    flex: 1;
    background: var(--panel2);
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
    margin-bottom: 16px;
    border: 1px solid var(--br);
}

.chat-message {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.chat-message.system {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--brand);
}

.message-text {
    color: var(--ink);
    font-size: 14px;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--panel);
    border: 1px solid var(--br);
    border-radius: 24px;
    color: var(--ink);
    font-size: 14px;
}

#chat-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--glow-brand);
}

/* Responsive Design for Tabs */
@media (max-width: 768px) {
    .bottom-navigation {
        padding: 6px 0;
    }
    
    .nav-tab {
        padding: 6px 8px;
        min-width: 50px;
    }
    
    .nav-icon {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .tab-content {
        padding: 16px;
        padding-bottom: 70px;
    }
    
    .tab-content .header h1 {
        font-size: 1.5rem;
    }
    
    .game-actions {
        grid-template-columns: 1fr;
    }
    
    .clan-actions {
        flex-direction: column;
    }
    
    .chat-channels {
        flex-wrap: wrap;
    }
    
    .chat-container {
        height: calc(100vh - 180px);
    }
}

/* ====== REWARDS SCREEN STYLES (TURKISH AESTHETIC) ====== */
.rewards-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0a0f1f 0%, #1a2332 50%, #0f1627 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: sparkle 4s infinite;
    overflow: hidden;
}

.rewards-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="%23fbbf24" opacity="0.3"/><circle cx="80" cy="40" r="1.5" fill="%23f59e0b" opacity="0.2"/><circle cx="40" cy="80" r="1" fill="%23d97706" opacity="0.4"/></svg>') repeat;
    animation: stars-twinkle 3s infinite ease-in-out;
}

@keyframes sparkle {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes stars-twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.rewards-container {
    background: linear-gradient(145deg, #1e2a47 0%, #2d3b5e 100%);
    border: 3px solid var(--gold);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 
        0 0 40px rgba(251, 191, 36, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: rewards-entrance 0.8s ease-out;
}

.rewards-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(251, 191, 36, 0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes rewards-entrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* New Aesthetic Rewards System */
.rewards-screen.animated {
    animation: fadeInGlow 1s ease-out;
}

@keyframes fadeInGlow {
    0% {
        opacity: 0;
        background: linear-gradient(135deg, #0a0f1f 0%, #1a2332 50%, #0f1627 100%);
    }
    100% {
        opacity: 1;
        background: linear-gradient(135deg, #0a0f1f 0%, #1a2332 50%, #0f1627 100%);
        box-shadow: inset 0 0 50px rgba(251, 191, 36, 0.1);
    }
}

.rewards-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.rewards-header {
    text-align: center;
    margin-bottom: 30px;
    animation: slideDown 0.8s ease-out 0.2s backwards;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounceIn 1s ease-out 0.5s backwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.result-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.result-title.victory {
    color: var(--gold);
}

.result-title.defeat {
    color: var(--error);
}

.result-reason {
    font-size: 1.1rem;
    color: var(--muted);
    margin: 10px 0;
}

.rewards-main {
    animation: slideUp 0.8s ease-out 0.4s backwards;
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.rewards-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.reward-card {
    background: linear-gradient(135deg, var(--panel) 0%, var(--panel2) 100%);
    border: 2px solid var(--br);
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    animation: cardSlideIn 0.6s ease-out backwards;
    overflow: hidden;
}

.reward-card:nth-child(1) { animation-delay: 0.6s; }
.reward-card:nth-child(2) { animation-delay: 0.7s; }
.reward-card:nth-child(3) { animation-delay: 0.8s; }
.reward-card:nth-child(4) { animation-delay: 0.9s; }

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-50px) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
}

.reward-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.reward-card.primary {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--panel) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.reward-card.gold {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--panel) 0%, rgba(251, 191, 36, 0.1) 100%);
}

.reward-card.hero {
    border-color: var(--brand-light);
    background: linear-gradient(135deg, var(--panel) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.reward-card.dragon {
    border-color: var(--error);
    background: linear-gradient(135deg, var(--panel) 0%, rgba(239, 68, 68, 0.1) 100%);
}

.reward-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.reward-card:hover::before {
    left: 100%;
}

.reward-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.reward-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reward-label {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.reward-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.rewards-actions {
    text-align: center;
    margin-top: 30px;
    animation: buttonAppear 1s ease-out 1.2s backwards;
}

@keyframes buttonAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.btn-collect {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border: none;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-collect:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.4);
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
}

.btn-collect:active {
    transform: translateY(-1px);
}

.btn-collect:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 🚫 Exploration Block Styles */
.battle-btn-card.disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background: var(--panel2) !important;
    border-color: var(--error) !important;
    filter: grayscale(70%);
    pointer-events: none;
}

.battle-btn-card.disabled:hover {
    transform: none !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3) !important;
}

.disabled-card {
    opacity: 0.5;
    filter: grayscale(50%);
}

.warning-text {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 10px 0;
    text-align: center;
    font-size: 0.9em;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-icon {
    font-size: 1.5rem;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-text {
    font-size: 1.1rem;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .reward-card {
        padding: 15px 10px;
    }
    
    .result-icon {
        font-size: 3rem;
    }
    
    .result-title {
        font-size: 2rem;
    }
    
    .btn-collect {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

.rewards-header {
    margin-bottom: 30px;
    position: relative;
}

.battle-title {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    margin: 0;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 20px rgba(251, 191, 36, 0.5); }
    to { text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 30px rgba(251, 191, 36, 0.8); }
}

.victory-title {
    color: #10b981;
}

.defeat-title {
    color: #ef4444;
}

.battle-subtitle {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin: 10px 0 0 0;
    font-style: italic;
}

.rewards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.reward-card {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border: 2px solid rgba(251, 191, 36, 0.4);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reward-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.3);
}

.reward-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.reward-card:hover::before {
    left: 100%;
}

.reward-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.reward-label {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reward-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.rewards-button {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.rewards-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.6);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
}

.rewards-button:active {
    transform: translateY(-1px);
}

.rewards-button::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;
}

.rewards-button:hover::before {
    left: 100%;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .rewards-container {
        padding: 24px 16px;
        margin: 16px;
    }
    
    .rewards-header h2 {
        font-size: 1.5rem;
    }
    
    .reward-item {
        padding: 12px 16px;
    }
    
    .rewards-actions .btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* Player Info Header Styles */
.player-info-header {
    background: var(--gradient-panel);
    padding: 12px 20px;
    border-bottom: 2px solid var(--brand);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-info-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.player-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--ink);
}

.player-level {
    font-size: 0.9rem;
    color: var(--muted);
}

.xp-info-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.xp-label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.xp-bar-mini {
    width: 100px;
    height: 6px;
    background: var(--bar);
    border-radius: 3px;
    overflow: hidden;
}

.xp-bar-mini .xp-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.resources-info-section {
    display: flex;
    gap: 16px;
}

.resource-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
}

.resource-mini .resource-label {
    color: var(--muted);
    margin-bottom: 2px;
}

.resource-mini .resource-value {
    color: var(--gold);
    font-weight: bold;
}

/* Mobile responsive for player info header */
@media (max-width: 768px) {
    .player-info-header {
        padding: 8px 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .resources-info-section {
        gap: 12px;
    }
    
    .resource-mini {
        font-size: 0.7rem;
    }
}

/* Enhanced XP Display Styles */
.player-xp-section {
    background: var(--panel);
    border: 1px solid var(--brand-dark);
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
}

.player-xp-section h3 {
    color: var(--brand);
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.xp-display .xp-label {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.xp-bar-large {
    position: relative;
    height: 32px;
    background: var(--panel2);
    border: 2px solid var(--brand-dark);
    border-radius: 16px;
    overflow: hidden;
}

.xp-bar-large .xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-dark), var(--brand));
    border-radius: 14px;
    transition: width 0.3s ease;
}

.xp-bar-large .xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.dragons-section {
    background: var(--panel);
    border: 1px solid var(--gold-dark);
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
}

.dragons-section h3 {
    color: var(--gold);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.section-subtitle {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.dragon-xp-card {
    background: var(--panel2);
    border: 1px solid var(--gold-dark);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.dragon-xp-section .xp-bar {
    height: 20px;
    background: var(--panel);
    border: 1px solid var(--gold-dark);
    border-radius: 10px;
    overflow: hidden;
    margin: 8px 0;
}

.dragon-xp-section .xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    border-radius: 9px;
    transition: width 0.3s ease;
}

.dragon-xp-section .xp-values {
    color: var(--gold-light);
    font-size: 0.8rem;
    text-align: center;
}

/* Potions Market Styles */
.potions-container {
    padding: 20px;
}

.potions-header {
    text-align: center;
    margin-bottom: 30px;
}

.potions-header h3 {
    color: var(--brand);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.potions-description {
    color: var(--muted);
    font-size: 0.9rem;
}

.potion-category {
    margin-bottom: 40px;
}

.potion-category h4 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid;
}

.potions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.potion-card {
    background: var(--panel);
    border: 2px solid var(--panel2);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.potion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.potion-card.common {
    border-color: var(--muted);
}

.potion-card.rare {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--panel) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.potion-card.epic {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--panel) 0%, rgba(251, 191, 36, 0.05) 100%);
}

.potion-card.legendary {
    border-color: var(--hp1);
    background: linear-gradient(135deg, var(--panel) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.potion-card.unaffordable {
    opacity: 0.6;
    filter: grayscale(0.3);
}

.potion-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.potion-info {
    width: 100%;
}

.potion-name {
    color: var(--ink);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.potion-description {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.potion-price {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.price-gold, .price-ingot {
    background: var(--panel2);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price-gold {
    color: var(--gold);
    border: 1px solid var(--gold-dark);
}

.price-ingot {
    color: var(--ingot);
    border: 1px solid var(--ingot);
}

.potion-card .btn {
    width: 100%;
    margin-top: auto;
}

@media (max-width: 768px) {
    .potions-grid {
        grid-template-columns: 1fr;
    }
    
    .potion-card {
        padding: 12px;
    }
    
    .potion-icon {
        font-size: 2rem;
    }
}

/* BÖLGE SİSTEMİ STİLLERİ */

/* Bölge seçim ekranı */
.region-selection-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.region-header {
    text-align: center;
    margin-bottom: 30px;
}

.region-header h2 {
    color: var(--brand);
    margin-bottom: 10px;
    font-size: 2rem;
}

.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.region-card {
    background: var(--gradient-card);
    border: 2px solid var(--br);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.region-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

.region-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-brand);
    border-color: var(--brand);
}

.region-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.region-card h3 {
    color: var(--brand);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.region-description {
    color: var(--muted);
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.region-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.region-duration, .region-level {
    background: var(--panel2);
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--muted);
}

.region-resources {
    margin-bottom: 20px;
}

.region-resources strong {
    color: var(--ink);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 8px;
}

.resource-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.resource-tag {
    background: var(--brand);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.current-exploration {
    background: var(--gradient-panel);
    border: 1px solid var(--br);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.region-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--br);
}

/* Keşif ekranı */
.exploration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.exploration-header {
    text-align: center;
    margin-bottom: 30px;
}

.exploration-header h2 {
    color: var(--gold);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.exploration-main {
    background: var(--gradient-card);
    border: 1px solid var(--br);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
}

.exploration-progress {
    text-align: center;
    margin-bottom: 30px;
}

.exploration-progress h3 {
    color: var(--ink);
    margin-bottom: 20px;
}

.progress-bar {
    background: var(--panel2);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--br);
}

.progress-bar.small {
    height: 12px;
    border-radius: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--gold));
    transition: width 0.5s ease;
    border-radius: inherit;
}

.progress-text {
    color: var(--gold);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.time-remaining {
    color: var(--muted);
    font-size: 0.9rem;
}

.exploration-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.exploration-tips {
    background: var(--panel);
    border: 1px solid var(--br);
    border-radius: 10px;
    padding: 20px;
}

.exploration-tips h3 {
    color: var(--brand);
    margin-bottom: 15px;
}

.exploration-tips ul {
    list-style: none;
    padding: 0;
}

.exploration-tips li {
    color: var(--muted);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.exploration-tips li::before {
    content: '•';
    color: var(--gold);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Mini progress widget */
.mini-exploration-progress {
    background: var(--panel2);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--br);
}

.mini-exploration-progress h4 {
    color: var(--gold);
    margin-bottom: 10px;
    font-size: 1rem;
}

.progress-info {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 5px;
}

.exploration-status {
    background: var(--warning);
    color: var(--bg);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 8px;
    display: inline-block;
    font-weight: 600;
}

/* Keşif yapılan aktivite paneli güncellemesi */
.village-panel .exploration-status {
    background: var(--brand);
    color: white;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .regions-grid {
        grid-template-columns: 1fr;
    }
    
    .region-card {
        padding: 15px;
    }
    
    .region-icon {
        font-size: 2.5rem;
    }
    
    .exploration-main {
        padding: 20px;
    }
    
    .exploration-actions {
        flex-direction: column;
    }
    
    .exploration-actions .btn {
        width: 100%;
    }
    
    .region-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .region-duration, .region-level {
        text-align: center;
    }
}

/* =========================
   ANDROID OPTIMIZATIONS
   ========================= */

/* Dragon Selection Grid (Character Creation) */
.dragon-selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--android-spacing);
    margin-top: var(--android-spacing);
}

.dragon-option {
    background: var(--gradient-card);
    border: 2px solid transparent;
    border-radius: var(--android-radius);
    padding: var(--android-spacing);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--android-shadow);
    -webkit-tap-highlight-color: transparent;
}

.dragon-option:hover,
.dragon-option:focus {
    border-color: var(--brand);
    box-shadow: var(--glow-brand);
    transform: translateY(-2px);
}

.dragon-option.selected {
    border-color: var(--brand);
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
    box-shadow: var(--glow-brand);
}

.dragon-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 8px;
    color: white;
}

.dragon-icon.fire { background: linear-gradient(135deg, #f97316, #ea580c); }
.dragon-icon.water { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.dragon-icon.earth { background: linear-gradient(135deg, #84cc16, #65a30d); }
.dragon-icon.wind { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.dragon-option h3 {
    font-size: 0.9rem;
    margin: 4px 0;
    color: var(--ink);
}

.dragon-option p {
    font-size: 0.7rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.2;
}

/* Bottom Navigation (Android Style) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--panel);
    border-top: 1px solid var(--br);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.nav-btn {
    background: none;
    border: none;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    cursor: pointer;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-btn.active {
    color: var(--brand);
}

.nav-btn:hover,
.nav-btn:focus {
    color: var(--brand-light);
}

.nav-icon {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bottom Tab Content */
.bottom-tab-content {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    max-height: 50vh;
    background: var(--panel);
    border-top: 1px solid var(--br);
    overflow-y: auto;
    z-index: 99;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

/* Pazar Tab Styles */
.pazar-tab {
    padding: var(--android-spacing);
}

.pazar-categories {
    display: flex;
    gap: 4px;
    margin-bottom: var(--android-spacing);
    background: var(--panel2);
    border-radius: var(--android-radius);
    padding: 4px;
}

.category-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: calc(var(--android-radius) - 2px);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 36px;
}

.category-btn.active {
    background: var(--brand);
    color: white;
}

.pazar-items {
    max-height: 250px;
    overflow-y: auto;
}

.pazar-item {
    background: var(--panel2);
    border-radius: var(--android-radius);
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pazar-item .item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--android-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background: var(--gradient-primary);
}

.pazar-item .item-icon.ates { background: linear-gradient(135deg, #f97316, #ea580c); }
.pazar-item .item-icon.su { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.pazar-item .item-icon.toprak { background: linear-gradient(135deg, #84cc16, #65a30d); }
.pazar-item .item-icon.ruzgar { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.pazar-item .item-info {
    flex: 1;
}

.pazar-item .item-info h4 {
    margin: 0 0 2px 0;
    color: var(--ink);
    font-size: 0.9rem;
}

.item-stats {
    display: flex;
    gap: 8px;
}

.item-stats span {
    font-size: 0.65rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--brand);
    padding: 2px 6px;
    border-radius: 4px;
}

.item-price {
    text-align: right;
    margin-right: 8px;
}

.price-value {
    font-weight: bold;
    color: var(--gold);
    display: block;
    font-size: 0.9rem;
}

/* Settings Tab Styles */
.settings-tab {
    padding: var(--android-spacing);
}

.setting-group {
    background: var(--panel2);
    border-radius: var(--android-radius);
    padding: var(--android-spacing);
    margin-bottom: var(--android-spacing);
}

.setting-group h4 {
    margin: 0 0 12px 0;
    color: var(--ink);
    font-size: 0.95rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    color: var(--ink);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-item input[type="range"] {
    flex: 1;
    margin: 0 12px;
}

.setting-value {
    color: var(--muted);
    font-size: 0.8rem;
    min-width: 40px;
    text-align: right;
}

.setting-description {
    font-size: 0.7rem;
    color: var(--muted);
    margin: 4px 0 0 0;
}

/* Android-specific form elements */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand);
}

input[type="range"] {
    height: 6px;
    background: var(--bar);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive Android adjustments */
@media (max-width: 480px) {
    .setting-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .setting-item input[type="range"] {
        margin: 0;
    }
    
    .setting-value {
        text-align: center;
    }
}

/* Clean Village Screen Styles */
.village-screen {
    padding: 16px;
    max-width: 100%;
}

.village-header {
    background: var(--panel);
    border-radius: var(--android-radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--android-shadow);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.village-info {
    flex: 1;
}

.player-info h2 {
    margin: 0 0 4px 0;
    color: var(--ink);
    font-size: 1.2rem;
}

.player-info p {
    margin: 0 0 8px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.time-display {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.time-display.day {
    background: rgba(251, 191, 36, 0.2);
    color: var(--gold);
}

.time-display.night {
    background: rgba(139, 92, 246, 0.2);
    color: var(--brand-light);
}

.resources-display {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.resource {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: var(--panel2);
    border-radius: 6px;
    min-width: 60px;
}

.resource-label {
    font-size: 0.7rem;
    color: var(--muted);
    margin-bottom: 2px;
}

.resource-value {
    font-weight: bold;
    color: var(--ink);
    font-size: 0.9rem;
}

.resource.gold .resource-value {
    color: var(--gold);
}

.resource.ingot .resource-value {
    color: var(--brand-light);
}

.building-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.building-slot {
    background: var(--panel);
    border-radius: var(--android-radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--android-shadow);
    position: relative;
}

.building-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.building-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin: 0 auto 8px;
}

.building-slot h3 {
    margin: 0 0 4px 0;
    color: var(--ink);
    font-size: 1rem;
}

.building-slot p {
    margin: 0 0 8px 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.building-level,
.league-time {
    font-size: 0.7rem;
    color: var(--brand);
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.locked {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--error);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.village-footer {
    margin-top: 16px;
    padding: 12px;
    background: var(--panel2);
    border-radius: var(--android-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-stats {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Barracks Screen */
.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--panel);
    border-radius: var(--android-radius);
    margin-bottom: 16px;
}

.screen-header h2 {
    margin: 0;
    color: var(--ink);
}

.screen-header p {
    margin: 4px 0 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.dragon-slots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dragon-slot {
    background: var(--panel);
    border-radius: var(--android-radius);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--android-shadow);
}

.dragon-slot.active {
    border: 2px solid var(--brand);
    box-shadow: var(--glow-brand);
}

.dragon-info h3 {
    margin: 0 0 4px 0;
    color: var(--ink);
}

.dragon-info p {
    margin: 0 0 8px 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.dragon-stats {
    display: flex;
    gap: 8px;
}

.dragon-stats span {
    font-size: 0.7rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--brand);
    padding: 2px 6px;
    border-radius: 4px;
}

.active-badge {
    background: var(--success);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.no-dragons {
    text-align: center;
    padding: 32px;
    color: var(--muted);
}

/* Market Screen */
.market-categories {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--panel2);
    border-radius: var(--android-radius);
    padding: 4px;
}

.category-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: calc(var(--android-radius) - 2px);
    font-size: 0.8rem;
    cursor: pointer;
}

.category-btn.active {
    background: var(--brand);
    color: white;
}

.market-item {
    background: var(--panel);
    border-radius: var(--android-radius);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--android-shadow);
}

.market-item h3 {
    margin: 0 0 4px 0;
    color: var(--ink);
}

.market-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.item-price {
    color: var(--gold);
    font-weight: bold;
    margin-right: 12px;
}

/* Placeholder styles */
.placeholder {
    text-align: center;
    padding: 64px 32px;
    color: var(--muted);
    background: var(--panel);
    border-radius: var(--android-radius);
    margin: 16px;
}

/* Management System Styles */
.village-management {
    display: flex;
    align-items: center;
    z-index: 10;
    position: relative;
}

.management-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    border: 1px solid #6366f1;
    background: #6366f1;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    font-weight: 500;
}

.management-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.management-btn:active {
    transform: translateY(0px);
    background: #5b21b6;
}

.management-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
    padding-bottom: 20px;
}

.management-menu {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px 12px 0 0;
    padding: 20px;
    min-width: 90vw;
    max-width: 95vw;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
    margin: 0 10px;
}

.management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #374151;
}

.management-header h3 {
    margin: 0;
    color: #f9fafb;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: var(--error);
    color: white;
}

.management-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.management-buttons .management-option:nth-child(4),
.management-buttons .management-option:nth-child(5) {
    grid-column: span 1;
}

.management-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    gap: 4px;
    border-radius: 8px;
    border: 1px solid #374151;
    background: #374151;
    color: #f9fafb;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
    justify-content: center;
    font-size: 0.8rem;
}

.management-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.management-option.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    border-color: var(--brand);
}

.management-option.btn-success {
    background: linear-gradient(135deg, var(--success), #22c55e);
    border-color: var(--success);
}

.management-option.btn-info {
    background: linear-gradient(135deg, var(--info), #0ea5e9);
    border-color: var(--info);
}

.management-option.btn-warning {
    background: linear-gradient(135deg, var(--warning), #f59e0b);
    border-color: var(--warning);
}

.management-option .btn-icon {
    font-size: 1.5rem;
}

.management-option .btn-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Inventory System Styles */
.inventory-screen {
    padding: 16px;
}

.inventory-info {
    background: var(--panel);
    border-radius: var(--android-radius);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.inventory-stats {
    display: flex;
    gap: 16px;
    color: var(--ink);
    font-size: 0.9rem;
}

.inventory-actions .max-level {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.inventory-slot {
    background: var(--panel);
    border: 2px solid var(--br);
    border-radius: var(--android-radius);
    padding: 12px;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.inventory-slot.filled {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--panel), rgba(99, 102, 241, 0.05));
}

.inventory-slot.empty {
    border-style: dashed;
    opacity: 0.6;
}

.inventory-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.empty-slot-icon {
    font-size: 2rem;
    color: var(--muted);
}

.item-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.item-name {
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
    text-align: center;
    line-height: 1.2;
}

.item-quantity {
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.item-use-btn {
    background: var(--brand);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.item-use-btn:hover {
    background: var(--brand-light);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .management-menu {
        padding: 20px;
        min-width: 280px;
    }
    
    .management-buttons {
        grid-template-columns: 1fr;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .inventory-slot {
        min-height: 120px;
        padding: 8px;
    }
    
    .item-icon {
        font-size: 2rem;
    }
    
    .inventory-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .inventory-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* Management Screen Styles */
.management-screen {
    padding: 16px;
}

.management-content {
    margin-top: 16px;
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.management-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: #f9fafb;
    text-decoration: none;
    display: block;
}

.management-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #6366f1;
}

.management-card .card-header {
    margin-bottom: 12px;
}

.management-card .card-header h3 {
    margin: 0;
    color: #6366f1;
    font-size: 1.2rem;
    font-weight: 600;
}

.management-card .card-content p {
    margin: 0;
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Mobile responsive for management */
@media (max-width: 768px) {
    .management-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .management-card {
        padding: 16px;
    }
    
    .management-card .card-header h3 {
        font-size: 1.1rem;
    }
}


/* Locked Building Styles */

.buildable-building.locked {
    opacity: 0.6;
    background: linear-gradient(135deg, #444, #333);
    border: 1px solid #666;
}

.buildable-building.locked .building-info h4 {
    color: #999;
}

.buildable-building.locked .lock-reason {
    color: #ff9800;
    font-style: italic;
    font-size: 12px;
    margin-top: 5px;
}

.buildable-building.locked .cost-item {
    color: #666;
}

.buildable-building.locked .build-btn {
    background: #666;
    color: #999;
    cursor: not-allowed;
}

.buildable-building.locked .build-btn:hover {
    background: #666;
    transform: none;
}
