/* Dan Idles - Modern Responsive UI with Dark Theme */

/* CSS Variables for Light/Dark Theme */
:root {
    /* Light theme (default) */
    --bg-gradient-start: #f5f7fa;
    --bg-gradient-end: #c3cfe2;
    --panel-bg: rgba(255, 255, 255, 0.95);
    --panel-border: rgba(255, 255, 255, 0.3);
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #495057;
    --border-color: #e9ecef;
    --border-hover: #3498db;
    --button-bg: linear-gradient(135deg, #ffffff, #f8f9fa);
    --button-active: linear-gradient(135deg, #e8f8f5, #d5f4e6);
    --status-bg: linear-gradient(135deg, #f8f9fa, #e9ecef);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --accent-primary: #3498db;
    --accent-success: #2ecc71;
    --accent-danger: #e74c3c;
}

/* Dark theme */
[data-theme="dark"] {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --panel-bg: rgba(30, 30, 50, 0.95);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #bdc1c6;
    --border-color: #3c4043;
    --border-hover: #4285f4;
    --button-bg: linear-gradient(135deg, #2d2d44, #3c3c54);
    --button-active: linear-gradient(135deg, #1e3a5f, #2d5a3d);
    --status-bg: linear-gradient(135deg, #2d2d44, #3c3c54);
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --accent-primary: #4285f4;
    --accent-success: #34a853;
    --accent-danger: #ea4335;
}

/* Auto-detect system preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-gradient-start: #1a1a2e;
        --bg-gradient-end: #16213e;
        --panel-bg: rgba(30, 30, 50, 0.95);
        --panel-border: rgba(255, 255, 255, 0.1);
        --text-primary: #e8eaed;
        --text-secondary: #9aa0a6;
        --text-muted: #bdc1c6;
        --border-color: #3c4043;
        --border-hover: #4285f4;
        --button-bg: linear-gradient(135deg, #2d2d44, #3c3c54);
        --button-active: linear-gradient(135deg, #1e3a5f, #2d5a3d);
        --status-bg: linear-gradient(135deg, #2d2d44, #3c3c54);
        --shadow-light: rgba(0, 0, 0, 0.3);
        --shadow-medium: rgba(0, 0, 0, 0.4);
        --accent-primary: #4285f4;
        --accent-success: #34a853;
        --accent-danger: #ea4335;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    transition: all 0.3s ease;
    position: relative;
}

/* Animated gradient background */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Add floating particles background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
    animation: floatingParticles 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes floatingParticles {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Login Section */
.login-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-container {
    max-width: 500px;
    width: 90%;
    margin: 0 auto;
}

.login-content {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px var(--shadow-medium);
    border: 1px solid var(--panel-border);
    animation: fadeInUp 0.6s ease-out;
}

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

.login-content h1 {
    font-size: 3em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-primary), #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-content h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.8em;
    font-weight: 600;
}

.login-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1em;
    line-height: 1.6;
}

.login-features {
    margin: 30px 0;
    text-align: left;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    padding: 12px;
    background: var(--status-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateX(5px);
    border-color: var(--border-hover);
}

.feature-icon {
    font-size: 1.5em;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-login-btn {
    background: linear-gradient(135deg, #4285f4, #1976d2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 30px auto;
    transition: all 0.3s ease;
    min-width: 250px;
}

.google-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(66, 133, 244, 0.4);
}

.google-login-btn:active {
    transform: translateY(0);
}

.google-login-btn svg {
    width: 20px;
    height: 20px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 0.9em;
    color: var(--text-muted);
    margin: 5px 0;
}

/* Enhanced game container */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Clean, professional header design */
.header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: headerShimmer 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes headerShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Game title */
.header h1 {
    font-size: 2.2em;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
    flex-shrink: 0;
}

/* Player info section - clean horizontal layout */
.player-info {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
    min-width: 0;
}

/* Player identity - avatar and name */
.player-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.player-avatar:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
}

#player-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
    white-space: nowrap;
}

/* Player stats - level and XP */
.player-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    max-width: 250px;
    flex-shrink: 0;
}

.level-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.level-label {
    font-size: 0.8em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-value {
    font-size: 1.2em;
    font-weight: 800;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Clean XP bar design */
.xp-display {
    position: relative;
    width: 100%;
}

.xp-bar-container {
    position: relative;
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid #4a90e2;
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff 0%, #5b86e5 50%, #36d1dc 100%);
    border-radius: 9px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 2px;
}

.xp-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: xpShine 2s ease-in-out infinite;
}

@keyframes xpShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
}

/* Resources display */
.resources {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.resource {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 80px;
    justify-content: center;
    white-space: nowrap;
}

.resource::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.resource:hover::before {
    opacity: 1;
    animation: resourceShimmer 0.6s ease;
}

@keyframes resourceShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.resource:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.resource-icon {
    font-size: 1.1em;
}

.resource-count {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Header controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logout-section {
    display: flex;
    align-items: center;
}

/* Button styling */
.leaderboard-btn, .theme-toggle {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    backdrop-filter: blur(10px);
}

.leaderboard-btn:hover, .theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
}

.logout-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

/* Main Game Area */
.game-area {
    display: grid;
    grid-template-columns: 1fr 350px 350px;
    gap: 25px;
    flex: 1;
    height: calc(100vh - 140px);
    position: relative;
}

.game-area::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 25px;
    backdrop-filter: blur(10px);
    z-index: -1;
}

/* Actions Panel */
.actions-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    overflow: hidden;
}

.actions-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: panelShimmer 12s ease-in-out infinite;
}

@keyframes panelShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.current-status {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.15) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.status-label {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status-value {
    font-size: 1.4em;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.status-value.active-action {
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
    animation: statusGlow 2s ease-in-out infinite alternate;
}

@keyframes statusGlow {
    0% { text-shadow: 0 0 15px rgba(0, 255, 136, 0.5); }
    100% { text-shadow: 0 0 25px rgba(0, 255, 136, 0.8); }
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Action buttons with stunning animations */
.action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
    min-height: 120px;
}

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

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

.action-btn:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: actionHoverPulse 0.6s ease-out;
}

@keyframes actionHoverPulse {
    0% { box-shadow: 0 20px 40px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 25px 50px rgba(102, 126, 234, 0.7); }
    100% { box-shadow: 0 20px 40px rgba(102, 126, 234, 0.5); }
}

.action-btn.active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 
        0 15px 35px rgba(17, 153, 142, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: actionActive 2s ease-in-out infinite alternate;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes actionActive {
    0% { 
        transform: scale(1);
        box-shadow: 0 15px 35px rgba(17, 153, 142, 0.5);
    }
    100% { 
        transform: scale(1.02);
        box-shadow: 0 20px 40px rgba(17, 153, 142, 0.7);
    }
}

.action-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.action-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
    animation: iconGlow 3s ease-in-out infinite alternate;
}

@keyframes iconGlow {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 0.8; transform: scale(1.2); }
}

.action-text {
    flex: 1;
    text-align: left;
}

.action-title {
    font-size: 1.5em;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.action-rate {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

/* Mining and Woodcutting specific styles */
.mining-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.mining-btn:hover .action-icon {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3), rgba(41, 128, 185, 0.2));
    animation: miningIconPulse 1s ease-in-out infinite;
}

@keyframes miningIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1) rotate(-2deg); }
}

.woodcutting-btn {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.woodcutting-btn:hover .action-icon {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.3), rgba(211, 84, 0, 0.2));
    animation: woodcuttingIconPulse 1s ease-in-out infinite;
}

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

/* Feed Panel */
.feed-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.feed-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: panelShimmer 14s ease-in-out infinite;
}

.feed-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feed-header h3 {
    font-size: 1.4em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--accent-success);
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Resource float animation for gains */
@keyframes resourceFloat {
    0% { 
        opacity: 1; 
        transform: translateY(0px) translateX(-50%) scale(1);
    }
    50% { 
        transform: translateY(-20px) translateX(-50%) scale(1.1);
    }
    100% { 
        opacity: 0; 
        transform: translateY(-40px) translateX(-50%) scale(0.8);
    }
}

.feed-content {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--panel-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.feed-item:hover {
    transform: translateX(5px);
    border-color: var(--border-hover);
    box-shadow: 0 5px 15px var(--shadow-light);
}

.feed-item.empty-state {
    flex-direction: column;
    text-align: center;
    padding: 30px;
    background: var(--status-bg);
    border-style: dashed;
    border-width: 2px;
    opacity: 0.7;
}

.empty-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    opacity: 0.6;
}

.empty-text strong {
    color: var(--text-primary);
    font-size: 1.1em;
}

.empty-text small {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.4;
    margin-top: 5px;
    display: block;
}

.activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initial {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.activity-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
}

.activity-time {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
    opacity: 0.7;
}

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

/* Scrollbar Styling */
.feed-content::-webkit-scrollbar {
    width: 6px;
}

.feed-content::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px;
}

.feed-content::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 3px;
}

.feed-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .game-area {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }
    
    .crafting-panel {
        order: 2;
        max-height: 300px;
    }
    
    .feed-panel {
        order: 3;
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .game-container {
        padding: 15px;
    }
    
    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 16px;
        text-align: center;
        min-height: auto;
    }
    
    .header h1 {
        font-size: 1.8em;
        order: 1;
    }
    
    .player-info {
        order: 2;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }
    
    .player-identity {
        justify-content: center;
    }
    
    .player-stats {
        min-width: auto;
        max-width: 280px;
        width: 100%;
    }
    
    .resources {
        justify-content: center;
        gap: 8px;
    }
    
    .resource {
        padding: 6px 12px;
        font-size: 0.85em;
        min-width: 70px;
    }
    
    .header-controls {
        order: 3;
        justify-content: center;
    }
    
    .logout-section {
        order: 4;
        justify-content: center;
    }
    
    .action-btn {
        padding: 15px;
        gap: 15px;
    }
    
    .action-icon {
        width: 60px;
        height: 60px;
    }
    
    .action-title {
        font-size: 1.1em;
    }
    
    .actions-panel,
    .feed-panel {
        padding: 20px;
    }
    
    .game-area {
        height: auto;
        gap: 15px;
    }
    
    .feed-panel {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 10px;
    }
    
    .header {
        padding: 12px 15px;
        border-radius: 12px;
        gap: 12px;
    }
    
    .header h1 {
        font-size: 1.5em;
    }
    
    #player-name {
        font-size: 1em;
    }
    
    .player-stats {
        max-width: 240px;
    }
    
    .level-display {
        padding: 4px 12px;
    }
    
    .level-label {
        font-size: 0.7em;
    }
    
    .level-value {
        font-size: 1em;
    }
    
    .xp-bar-container {
        height: 16px;
    }
    
    .xp-text {
        font-size: 0.6em;
    }
    
    .resources {
        gap: 6px;
    }
    
    .resource {
        padding: 4px 8px;
        font-size: 0.8em;
        min-width: 60px;
    }
    
    .player-avatar {
        width: 32px;
        height: 32px;
    }
    
    .header-controls {
        gap: 8px;
    }
    
    .leaderboard-btn, .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1em;
    }
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .action-btn {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }
    
    .action-icon {
        width: 50px;
        height: 50px;
    }
    
    .action-title {
        font-size: 1em;
    }
    
    .action-rate {
        font-size: 0.8em;
    }
    
    .actions-panel,
    .feed-panel {
        padding: 15px;
    }
}

/* Shop Button */
.shop-btn {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-right: 12px;
}

.shop-btn:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* Shop Modal */
.shop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.shop-modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.shop-header {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.shop-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.shop-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.shop-body {
    padding: 24px;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

.user-resources {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--hover-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.resource-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.resource-icon {
    font-size: 20px;
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shop-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.shop-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.1);
}

.shop-item-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover-bg);
    border-radius: 12px;
    flex-shrink: 0;
}

.shop-item-details {
    flex: 1;
}

.shop-item-details h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.shop-item-details p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.shop-item-cost {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-primary);
}

.shop-item-maxed {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-success);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-item-action {
    flex-shrink: 0;
}

.shop-purchase-btn {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.shop-purchase-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.shop-purchase-btn:disabled,
.shop-purchase-btn.disabled {
    background: #6B7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.shop-purchase-btn.maxed {
    background: #6B7280;
    cursor: default;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .shop-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .shop-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .shop-item-details {
        text-align: center;
    }
    
    .user-resources {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

/* Player Stats (Level and XP) */
.player-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.level-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: levelGlow 2s ease-in-out infinite alternate;
}

@keyframes levelGlow {
    0% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
    100% { box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5); }
}

.level-label {
    font-size: 0.8em;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-value {
    font-size: 1.2em;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: levelPulse 1.5s ease-in-out infinite alternate;
}

@keyframes levelPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.xp-display {
    position: relative;
    width: 100%;
}

.xp-bar-container {
    position: relative;
    width: 100%;
    height: 24px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #4a90e2;
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        #00d4ff 0%, 
        #5b86e5 25%, 
        #36d1dc 50%, 
        #5b86e5 75%, 
        #00d4ff 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: xpFlow 3s linear infinite;
}

@keyframes xpFlow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.xp-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: xpShine 2s ease-in-out infinite;
}

@keyframes xpShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.3px;
    z-index: 2;
    pointer-events: none;
}

/* Resources with beautiful animations */
.resources {
    display: flex;
    gap: 12px;
    align-items: center;
}

.resource {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.resource::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.resource:hover::before {
    opacity: 1;
    animation: resourceShimmer 0.6s ease;
}

@keyframes resourceShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.resource:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* Character animations enhanced */
.character-animation {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 
        0 10px 30px rgba(255, 183, 159, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.character-animation::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.4) 0%, 
        transparent 70%);
    animation: characterGlow 4s ease-in-out infinite alternate;
}

@keyframes characterGlow {
    0% { opacity: 0.3; transform: scale(0.8) rotate(0deg); }
    100% { opacity: 1; transform: scale(1.3) rotate(360deg); }
}

.character-mining, .character-woodcutting {
    font-size: 28px;
    z-index: 2;
    position: relative;
    animation: characterWork 1.2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.character-mining::before {
    content: '⛏️';
    display: block;
}

.character-woodcutting::before {
    content: '🪓';
    display: block;
}

@keyframes characterWork {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    25% { 
        transform: translateY(-6px) rotate(-8deg) scale(1.1);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    }
    50% { 
        transform: translateY(-3px) rotate(0deg) scale(1.05);
        filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
    }
    75% { 
        transform: translateY(-6px) rotate(8deg) scale(1.1);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    }
}

/* Add particle burst effect when working */
.action-btn.active .character-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: particleBurst 2s linear infinite;
}

@keyframes particleBurst {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    10% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% { 
        opacity: 0;
        transform: translate(-50%, -50%) translate(40px, -40px) scale(0);
    }
}

/* Floating resource gain animation */
.resource-gain-float {
    position: absolute;
    font-size: 1.2em;
    font-weight: 700;
    pointer-events: none;
    z-index: 1000;
    color: #00ff88;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    animation: resourceGainFloat 2s ease-out forwards;
}

@keyframes resourceGainFloat {
    0% { 
        opacity: 1; 
        transform: translateY(0px) translateX(-50%) scale(1);
    }
    25% { 
        transform: translateY(-20px) translateX(-50%) scale(1.2);
    }
    100% { 
        opacity: 0; 
        transform: translateY(-60px) translateX(-50%) scale(0.8);
    }
}

/* Feed panel beautiful styling */
.feed-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feed-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    font-weight: 600;
    color: #ffffff;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulseIndicator 2s ease-in-out infinite;
    box-shadow: 0 0 10px #00ff88;
}

@keyframes pulseIndicator {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 10px #00ff88;
    }
    50% { 
        opacity: 0.3; 
        transform: scale(1.2);
        box-shadow: 0 0 20px #00ff88;
    }
}

/* Level up notification */
.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 50px rgba(102, 126, 234, 0.5);
    z-index: 10000;
    animation: levelUpAppear 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
}

@keyframes levelUpAppear {
    0% { 
        transform: translate(-50%, -50%) scale(0) rotate(-10deg);
        opacity: 0;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

.level-up-notification.fade-out {
    animation: levelUpFadeOut 0.5s ease-out forwards;
}

@keyframes levelUpFadeOut {
    to { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

.level-up-icon {
    font-size: 3em;
    margin-bottom: 10px;
    animation: levelUpIconSpin 0.8s ease-out;
}

@keyframes levelUpIconSpin {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.level-up-text {
    font-size: 1.5em;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.level-up-level {
    font-size: 1.2em;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Glassmorphism effects for modern look */
.header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.game-area {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark theme enhancements */
body.dark-theme {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    background-attachment: fixed;
}

body.dark-theme .header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* Light theme enhancements */
body.light-theme {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
}

body.light-theme .header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
}

/* Smooth theme transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Button hover effects for all interactive elements */
button:not(.action-btn) {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:not(.action-btn):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Achievement System Styles */
.achievement-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 8px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
    overflow: hidden;
}

.achievement-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.achievement-btn:hover::before {
    opacity: 1;
    animation: achievementButtonShimmer 0.6s ease;
}

@keyframes achievementButtonShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.achievement-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Achievement Modal */
.achievement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    animation: achievementModalFadeIn 0.3s ease-out;
}

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

.achievement-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    animation: achievementModalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes achievementModalSlideIn {
    from { 
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.achievement-modal-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    color: #ffffff;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement-modal-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.achievement-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.achievement-modal-body {
    padding: 28px;
    max-height: calc(80vh - 140px);
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.achievement-stats {
    margin-bottom: 24px;
    text-align: center;
}

.achievement-progress {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    padding: 16px 24px;
    border-radius: 16px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement-progress span:first-child {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 8px;
}

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement-item::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.6s ease;
}

.achievement-item:hover::before {
    left: 100%;
}

.achievement-item.unlocked {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    animation: achievementGlow 3s ease-in-out infinite alternate;
}

@keyframes achievementGlow {
    0% { box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2); }
    100% { box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4); }
}

.achievement-item.locked {
    opacity: 0.6;
    filter: grayscale(50%);
}

.achievement-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.achievement-item-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

.achievement-item.unlocked .achievement-item-icon {
    animation: achievementIconPulse 2s ease-in-out infinite alternate;
}

@keyframes achievementIconPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.achievement-item-details {
    flex: 1;
    min-width: 0;
    color: #ffffff;
}

.achievement-item-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.achievement-item-description {
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.4;
}

.achievement-item-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.achievement-rarity {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievement-item.common .achievement-rarity {
    background: linear-gradient(135deg, #10B981, #34D399);
    color: #ffffff;
}

.achievement-item.uncommon .achievement-rarity {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    color: #ffffff;
}

.achievement-item.rare .achievement-rarity {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    color: #ffffff;
}

.achievement-item.epic .achievement-rarity {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    color: #1a1a1a;
}

.achievement-xp {
    font-size: 12px;
    font-weight: 600;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.achievement-unlocked-badge {
    background: linear-gradient(135deg, #10B981, #34D399);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    animation: achievementBadgeRotate 3s linear infinite;
}

@keyframes achievementBadgeRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 350px;
    max-width: 450px;
    padding: 0;
    border-radius: 20px;
    z-index: 10001;
    overflow: hidden;
    animation: achievementSlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 50px rgba(102, 126, 234, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes achievementSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.achievement-notification.fade-out {
    animation: achievementSlideOut 1s ease-out forwards;
}

@keyframes achievementSlideOut {
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

.achievement-notification.common {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
}

.achievement-notification.uncommon {
    background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
}

.achievement-notification.rare {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
}

.achievement-notification.epic {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 80px rgba(245, 158, 11, 0.6);
}

.achievement-content {
    position: relative;
    padding: 20px;
    color: #ffffff;
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.achievement-icon {
    font-size: 40px;
    animation: achievementIconBounce 0.8s ease-out;
}

@keyframes achievementIconBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

.achievement-text {
    flex: 1;
}

.achievement-unlock-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.achievement-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.achievement-description {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 6px;
    line-height: 1.3;
}

.achievement-reward {
    font-size: 12px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.achievement-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(-100px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0);
    }
}

/* Leaderboard Button Styling */
.leaderboard-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 8px;
    color: #1a1a1a;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.leaderboard-btn:hover {
    background: linear-gradient(135deg, #FFB800 0%, #FF8C00 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

/* Mobile responsiveness for achievements */
@media (max-width: 768px) {
    .achievement-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .achievement-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .achievement-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .achievement-item-icon {
        margin: 0 auto;
    }
}

/* Sound System Controls */
.sound-controls {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 12px;
}

.sound-toggle-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 12px 16px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.sound-toggle-btn.disabled {
    background: linear-gradient(135deg, #6B7280 0%, #9CA3AF 100%);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.sound-toggle-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.sound-toggle-btn:hover::before {
    opacity: 1;
    animation: soundButtonShimmer 0.6s ease;
}

.sound-toggle-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.sound-toggle-btn.disabled:hover {
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.5);
}

.sound-icon {
    font-size: 18px;
    animation: soundIconPulse 2s ease-in-out infinite alternate;
}

.sound-status {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes soundIconPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

@keyframes soundButtonShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Audio Visualizer */
.audio-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    padding: 0 4px;
}

.visualizer-bar {
    width: 3px;
    height: 10%;
    background: linear-gradient(to top, #FF6B6B, #FF8E53);
    border-radius: 2px;
    transition: height 0.1s ease;
    animation: visualizerPulse 0.5s ease-in-out infinite alternate;
}

.visualizer-bar:nth-child(1) { animation-delay: 0s; }
.visualizer-bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer-bar:nth-child(3) { animation-delay: 0.2s; }

@keyframes visualizerPulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.volume-slider-container {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    z-index: 1000;
    animation: volumeSlideIn 0.3s ease-out;
}

@keyframes volumeSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.volume-slider {
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, #e0e0e0, #f0f0f0);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
}

.volume-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 35px;
    text-align: center;
}

/* Quest System Styles */
.quest-btn {
    background: linear-gradient(135deg, #9C27B0 0%, #E91E63 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 8px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
    overflow: hidden;
}

.quest-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.quest-btn:hover::before {
    opacity: 1;
    animation: questButtonShimmer 0.6s ease;
}

@keyframes questButtonShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.quest-btn:hover {
    background: linear-gradient(135deg, #8E24AA 0%, #D81B60 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.4);
}

/* Quest Modal */
.quest-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: questModalFadeIn 0.3s ease-out;
}

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

.quest-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    animation: questModalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes questModalSlideIn {
    from { 
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.quest-modal-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    color: #ffffff;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quest-modal-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.quest-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quest-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.quest-modal-body {
    padding: 28px;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.quest-progress-summary {
    margin-bottom: 24px;
}

.quest-completion-rate {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    padding: 20px;
    border-radius: 16px;
    color: #ffffff;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.completion-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.completion-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 12px 0;
    position: relative;
}

.completion-fill {
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.completion-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: completionShine 2s ease-in-out infinite;
}

@keyframes completionShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.completion-percentage {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

/* Quest List */
.quest-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quest-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quest-item::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.6s ease;
}

.quest-item:hover::before {
    left: 100%;
}

.quest-item.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.quest-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.quest-icon {
    font-size: 36px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

.quest-details {
    flex: 1;
    min-width: 0;
    color: #ffffff;
}

.quest-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.quest-description {
    margin: 0 0 16px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.4;
}

.quest-progress {
    margin-bottom: 12px;
}

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

.quest-progress-fill {
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.quest-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.quest-rewards {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.reward-item {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.quest-status {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quest-completed-badge {
    background: linear-gradient(135deg, #10B981, #34D399);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    animation: questCompletedBadge 3s ease-in-out infinite alternate;
}

@keyframes questCompletedBadge {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* Quest Rarity Styles */
.quest-item.common {
    border-left: 4px solid #10B981;
}

.quest-item.uncommon {
    border-left: 4px solid #3B82F6;
}

.quest-item.rare {
    border-left: 4px solid #8B5CF6;
}

.quest-item.epic {
    border-left: 4px solid #F59E0B;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
}

/* Quest Notification */
.quest-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    min-width: 350px;
    max-width: 450px;
    padding: 0;
    border-radius: 20px;
    z-index: 10001;
    overflow: hidden;
    animation: questNotificationSlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 50px rgba(102, 126, 234, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes questNotificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.quest-notification.fade-out {
    animation: questNotificationSlideOut 1s ease-out forwards;
}

@keyframes questNotificationSlideOut {
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

.quest-notification.common {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
}

.quest-notification.uncommon {
    background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
}

.quest-notification.rare {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
}

.quest-notification.epic {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 80px rgba(245, 158, 11, 0.6);
}

.quest-notification-content {
    position: relative;
    padding: 20px;
    color: #ffffff;
}

.quest-notification-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.quest-notification-icon {
    font-size: 36px;
    animation: questNotificationIconBounce 0.8s ease-out;
}

@keyframes questNotificationIconBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

.quest-notification-text {
    flex: 1;
}

.quest-notification-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.quest-notification-quest {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.quest-notification-rewards {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quest-notification-rewards {
    font-size: 12px;
    opacity: 0.8;
}

/* Crafting Panel */
.crafting-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.crafting-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: panelShimmer 8s ease-in-out infinite;
}

.crafting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.crafting-header h3 {
    font-size: 1.4em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.roadmap-toggle {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.2);
}

.roadmap-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.3);
}

.roadmap-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.roadmap-section h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
}

.roadmap-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.roadmap-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
}

.roadmap-level {
    font-weight: 700;
    color: var(--accent-primary);
    min-width: 60px;
}

.roadmap-xp {
    color: var(--text-secondary);
    min-width: 60px;
}

.roadmap-unlocks {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.unlock-item {
    background: var(--accent-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.crafting-items {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
    margin-right: -8px;
}

.crafting-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.crafting-item::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.6s ease;
}

.crafting-item:hover::before {
    left: 100%;
}

.crafting-item:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.crafting-item-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.crafting-item-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
    animation: iconGlow 3s ease-in-out infinite alternate;
    opacity: 0.6;
}

.crafting-item-details {
    flex: 1;
    min-width: 0;
}

.crafting-item-details h4 {
    margin: 0 0 4px 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.crafting-item-details p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.3;
    opacity: 0.9;
}

.level-requirement {
    color: #e74c3c;
    font-size: 11px;
    font-weight: 600;
    background: rgba(231, 76, 60, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.crafting-item-cost {
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    background: rgba(52, 152, 219, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.crafting-item-maxed {
    color: #f39c12;
    font-size: 11px;
    font-weight: 700;
    background: rgba(243, 156, 18, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.crafting-item-action {
    flex-shrink: 0;
}

.crafting-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
    min-width: 80px;
}

.crafting-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}

.crafting-btn:disabled,
.crafting-btn.disabled {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.crafting-success-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.3);
    z-index: 10000;
    animation: craftingNotificationSlideIn 0.3s ease-out;
}

.crafting-success-notification.fade-out {
    animation: craftingNotificationSlideOut 0.3s ease-out;
}

@keyframes craftingNotificationSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes craftingNotificationSlideOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

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

.notification-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.notification-text {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.notification-xp {
    font-size: 14px;
    opacity: 0.9;
}

.loading-message, .no-items, .error-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-style: italic;
}

.error-message {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* Crafting items scrollbar */
.crafting-items::-webkit-scrollbar {
    width: 6px;
}

.crafting-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.crafting-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.crafting-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
  