/* ===================================
   SKYE'S REALM - ENHANCED STYLES
   =================================== */

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
    min-height: 100vh;
}

#root {
    min-height: 100vh;
    background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
}

/* ============================
   SCROLLBAR STYLING
   ============================ */
.chat-scroll {
    max-height: 300px;
    overflow-y: auto;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(28, 25, 23, 0.5);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d97706, #b45309);
    border-radius: 4px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

/* ============================
   ANIMATED BACKGROUNDS
   ============================ */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50% { transform: translateY(-30px) rotate(180deg); opacity: 1; }
}

.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.4), transparent);
    border-radius: 50%;
    animation: float 6s infinite ease-in-out;
}

/* ============================
   ENHANCED CARDS & PANELS
   ============================ */
.card-premium {
    position: relative;
    background: linear-gradient(135deg, rgba(28, 25, 23, 0.95) 0%, rgba(41, 37, 36, 0.95) 100%);
    border: 2px solid rgba(217, 119, 6, 0.3);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(217, 119, 6, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.2),
        0 0 40px rgba(217, 119, 6, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(217, 119, 6, 0.6);
}

.building-card {
    position: relative;
    background: linear-gradient(135deg, rgba(28, 25, 23, 0.95) 0%, rgba(41, 37, 36, 0.95) 100%);
    border: 2px solid rgba(120, 113, 108, 0.3);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.building-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(217, 119, 6, 0.4);
}

.card-glow {
    box-shadow: 
        0 0 10px rgba(217, 119, 6, 0.2),
        0 0 20px rgba(217, 119, 6, 0.1),
        0 0 40px rgba(217, 119, 6, 0.05);
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(217, 119, 6, 0.2), 0 0 20px rgba(217, 119, 6, 0.1); }
    50% { box-shadow: 0 0 20px rgba(217, 119, 6, 0.4), 0 0 40px rgba(217, 119, 6, 0.2); }
}

/* ============================
   ENHANCED BUTTONS
   ============================ */
.btn-premium {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-premium::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;
}

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

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(217, 119, 6, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-premium:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-premium:disabled {
    filter: grayscale(0.7);
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Amber Button (Infrastructure) */
.btn-amber {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-amber::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;
}

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

.btn-amber:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(245, 158, 11, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-amber:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-amber:disabled {
    filter: grayscale(0.7);
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Red Button (Military) */
.btn-red {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-red::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;
}

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

.btn-red:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-red:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-red:disabled {
    filter: grayscale(0.7);
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Green Button (Resource) */
.btn-green {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-green::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;
}

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

.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-green:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-green:disabled {
    filter: grayscale(0.7);
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 0.6;
    }
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.animate-ripple {
    animation: ripple 0.6s ease-out;
}

/* ============================
   TYPOGRAPHY ENHANCEMENTS
   ============================ */
.text-glow {
    text-shadow: 
        0 0 10px rgba(217, 119, 6, 0.5),
        0 0 20px rgba(217, 119, 6, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.5);
}

.text-embossed {
    text-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 3px rgba(0, 0, 0, 0.5);
}

.text-premium {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ============================
   ICON ENHANCEMENTS
   ============================ */
@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.icon-animated:hover {
    animation: icon-pulse 0.6s ease infinite;
}

.icon-glow {
    filter: drop-shadow(0 0 6px rgba(217, 119, 6, 0.6));
}

/* ============================
   MAP ENHANCEMENTS
   ============================ */
.map-grid {
    display: grid;
    grid-template-columns: repeat(20, 40px);
    gap: 1px;
    background: #1c1917;
}

.map-cell {
    width: 40px;
    height: 40px;
    border: 1px solid #44403c;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-cell:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.map-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(217, 119, 6, 0);
    transition: border-color 0.2s;
    pointer-events: none;
}

.map-cell:hover::before {
    border-color: rgba(217, 119, 6, 0.8);
}

/* ============================
   NOTIFICATIONS
   ============================ */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.notification-enter {
    animation: slideInRight 0.3s ease-out;
}

.notification-exit {
    animation: slideOutRight 0.3s ease-out;
}

.notification-premium {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.95), rgba(180, 83, 9, 0.95));
    backdrop-filter: blur(10px);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ============================
   LOADING & TRANSITIONS
   ============================ */
@keyframes spin-glow {
    0% {
        transform: rotate(0deg);
        box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
    }
    100% {
        transform: rotate(360deg);
        box-shadow: 0 0 20px rgba(217, 119, 6, 0.6);
    }
}

.loading-spinner {
    border: 3px solid rgba(217, 119, 6, 0.2);
    border-top-color: #d97706;
    animation: spin-glow 1s linear infinite;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #292524 0px, #44403c 40px, #292524 80px);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.animate-shimmer {
    animation: shimmer 3s infinite;
}

/* ============================
   UTILITY ANIMATIONS
   ============================ */
@keyframes bounce-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-bounce-in {
    animation: bounce-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* ============================
   RACE BADGE STYLES
   ============================ */
.race-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.race-badge.elf {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.race-badge.dwarf {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
}

.race-badge.gnome {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.race-badge.human {
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
}

.bonus-active {
    color: #27ae60;
    font-weight: bold;
    animation: pulse 2s infinite;
}

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

.race-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-with-bonus {
    display: flex;
    gap: 10px;
    align-items: center;
}

.stat-base {
    text-decoration: line-through;
    color: #95a5a6;
}

.stat-bonus {
    color: #27ae60;
    font-weight: bold;
}

.stat-decrease {
    color: #e74c3c;
    font-weight: bold;
}

/* ============================
   ADDITIONAL ANIMATIONS
   ============================ */
@keyframes pulse-slow {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.85;
        transform: scale(1.02);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

.scale-102 {
    transform: scale(1.02);
}

.hover\:scale-102:hover {
    transform: scale(1.02);
}
/*******************************************************************************
 * TRAVIAN-STYLE UI CSS ADDITIONS
 * Add these styles to your existing css/styles.css file
 ******************************************************************************/

/* Fade-in animation for resource detail popups */
@keyframes fade-in {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

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

/* Chat scroll styling */
.chat-scroll::-webkit-scrollbar {
    width: 8px;
}

.chat-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.chat-scroll::-webkit-scrollbar-thumb {
    background: rgba(217, 119, 6, 0.5);
    border-radius: 4px;
}

.chat-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 119, 6, 0.7);
}

/* Smooth transitions for hover effects */
button {
    transition: all 0.2s ease;
}

/* Resource bar hover effects */
.hover-lift:hover {
    transform: translateY(-2px);
}

/* Icon glow effect */
.icon-glow {
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

/* Text glow effect */
.text-glow {
    text-shadow: 0 0 10px rgba(217, 119, 6, 0.5);
}

/* Premium card styling */
.card-premium {
    background: linear-gradient(135deg, rgba(41, 37, 36, 0.95), rgba(68, 64, 60, 0.95));
    backdrop-filter: blur(10px);
}

/* Notification styling */
.notification-premium {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.95), rgba(180, 83, 9, 0.95));
    backdrop-filter: blur(10px);
}

.notification-enter {
    animation: slideInRight 0.3s ease-out;
}

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

/* Loading spinner */
.loading-spinner {
    border: 4px solid rgba(217, 119, 6, 0.2);
    border-top: 4px solid rgb(217, 119, 6);
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .animate-fade-in {
        position: fixed;
        left: 1rem;
        right: 1rem;
    }
}

/* Ensure z-index layers are correct */
.z-40 {
    z-index: 40;
}

.z-50 {
    z-index: 50;
}

/* Premium text gradient */
.text-premium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}