/* ===================================
   TRAVIAN-STYLE ENHANCEMENTS
   Additional CSS for Skye's Realm
   =================================== */

/* ============================
   TRAVIAN HEADER STYLES
   ============================ */

/* Player menu dropdown animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.player-menu-dropdown {
    animation: slideDown 0.2s ease-out;
}

/* ============================
   RESOURCE BAR ENHANCEMENTS
   ============================ */

/* Resource card hover effects */
.resource-card {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resource-card:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 16px rgba(217, 119, 6, 0.3);
}

/* Resource fill bar animations */
.resource-fill-bar {
    transition: width 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.resource-fill-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

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

/* ============================
   NAVIGATION ENHANCEMENTS
   ============================ */

/* Badge pulse animation */
.badge-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Tab active indicator slide */
.tab-indicator {
    transition: all 0.3s ease-out;
}

/* ============================
   MODAL & OVERLAY STYLES
   ============================ */

/* Resource details modal */
.resource-modal-overlay {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

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

.resource-modal {
    animation: modalSlideUp 0.3s ease-out;
}

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

/* ============================
   RESPONSIVE ADJUSTMENTS
   ============================ */

/* Landscape mode utilities for mobile devices */
@media (orientation: landscape) and (max-width: 1023px) {
    /* Show game name in landscape mode on mobile */
    .landscape\:block {
        display: block !important;
    }

    /* Show stats in landscape mode on mobile */
    .landscape\:flex {
        display: flex !important;
    }

    /* Show inline elements in landscape mode on mobile */
    .landscape\:inline {
        display: inline !important;
    }
}

/* Portrait mode - ensure hidden elements stay hidden */
@media (orientation: portrait) {
    .landscape\:block {
        display: none !important;
    }

    .landscape\:flex {
        display: none !important;
    }

    .landscape\:inline {
        display: none !important;
    }
}

/* Mobile-specific adjustments for Travian components */
@media (max-width: 768px) {
    /* Smaller resource cards on mobile */
    .resource-card {
        padding: 0.5rem;
    }

    /* Stack navigation vertically on very small screens */
    @media (max-width: 640px) {
        .navigation-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    /* Adjust header spacing */
    .travian-header {
        padding: 0.75rem 1rem;
    }

    /* Hide secondary stats on mobile */
    .mobile-hide-stat {
        display: none;
    }
}

/* ============================
   UTILITY CLASSES
   ============================ */

/* Gradient text effects */
.text-gradient-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow effects */
.glow-amber {
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.3);
}

.glow-amber-strong {
    box-shadow: 0 0 30px rgba(217, 119, 6, 0.5);
}

/* Border glow on hover */
.border-glow-hover:hover {
    border-color: rgba(217, 119, 6, 0.8);
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.3);
}

/* ============================
   ICON ENHANCEMENTS
   ============================ */

/* Icon rotation on hover */
.icon-rotate-hover:hover {
    transform: rotate(15deg);
    transition: transform 0.3s ease;
}

/* Icon glow */
.icon-glow {
    filter: drop-shadow(0 0 4px rgba(217, 119, 6, 0.5));
}

/* ============================
   CARD IMPROVEMENTS
   ============================ */

/* Premium card style for Travian components */
.travian-card {
    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);
}

.travian-card:hover {
    border-color: rgba(217, 119, 6, 0.6);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(217, 119, 6, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================
   SCROLLBAR IMPROVEMENTS
   ============================ */

/* Custom scrollbar for Travian modals */
.travian-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* ============================
   LOADING & TRANSITIONS
   ============================ */

/* Skeleton loading for resource bars */
.skeleton-pulse {
    animation: skeleton 1.5s ease-in-out infinite;
}

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

/* Page transition effects */
.page-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ============================
   BUTTON ENHANCEMENTS
   ============================ */

/* Travian-style button base */
.travian-button {
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.travian-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
}

.travian-button:hover::before {
    left: 100%;
}

/* Active button state */
.travian-button-active {
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ============================
   TOOLTIP IMPROVEMENTS
   ============================ */

/* Custom tooltip styling for Travian UI */
.travian-tooltip {
    position: relative;
}

.travian-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(28, 25, 23, 0.95);
    border: 2px solid rgba(217, 119, 6, 0.5);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.travian-tooltip:hover::after {
    opacity: 1;
}

/* ============================
   ACCESSIBILITY ENHANCEMENTS
   ============================ */

/* Focus visible for keyboard navigation */
.travian-focusable:focus-visible {
    outline: 2px solid #d97706;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .travian-card {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================
   PRINT STYLES
   ============================ */

@media print {
    .travian-header,
    .travian-resource-bar,
    .travian-navigation {
        display: none;
    }
}