/* World of Pharaos - Custom Theme */
/* Modernisiert für Bootstrap 5 und neue Spielseiten */

/* Import Google Font for Title */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap");

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    /* Pharao Theme Colors */
    --pharao-gold: #d4af37;
    --pharao-gold-hover: #b4941f;
    --pharao-gold-light: #f0d77a;
    --pharao-gold-dark: #a08424;
    --pharao-dark: #0f0d08;
    --pharao-blue: #1a1610;
    --pharao-sand: #f4e4bc;
    --pharao-bg-dark: #0f0d08;
    --pharao-bg-medium: #1a1610;
    
    /* Standard Button Colors - Sand/Gold Theme */
    --btn-primary-bg: #d4af37;
    --btn-primary-bg-hover: #b4941f;
    --btn-primary-text: #0f0f13;
    --btn-primary-text-hover: #0f0f13;
    --btn-gradient-start: #d4af37;
    --btn-gradient-end: #b4941f;
    --btn-gradient-hover-start: #b4941f;
    --btn-gradient-hover-end: #d4af37;
    
    /* Status Colors */
    --pharao-success: #006c16;
    --pharao-success-light: #00a020;
    --pharao-danger: #dc3545;
    --pharao-warning: #ffc107;
    --pharao-info: #0dcaf0;
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
    background-color: var(--pharao-dark);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--pharao-sand);
    min-height: 100vh;
}

a {
    color: var(--pharao-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--pharao-gold-light);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: linear-gradient(180deg, rgba(26, 22, 16, 0.98) 0%, rgba(15, 13, 8, 0.98) 100%) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.navbar-brand {
    font-family: "Cinzel", serif;
    color: var(--pharao-gold) !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.3rem;
}

.navbar-brand:hover {
    color: var(--pharao-gold-light) !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.nav-link {
    color: var(--pharao-sand) !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--pharao-gold) !important;
}

.nav-link.active {
    color: var(--pharao-gold) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--pharao-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Dropdown */
.dropdown-menu {
    background-color: var(--pharao-bg-medium);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.dropdown-item {
    color: var(--pharao-sand);
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(212, 175, 55, 0.15);
    color: var(--pharao-gold);
}

.dropdown-divider {
    border-color: rgba(212, 175, 55, 0.2);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-pharao {
    background: linear-gradient(135deg, var(--btn-gradient-start) 0%, var(--btn-gradient-end) 100%);
    color: var(--btn-primary-text);
    border: 1px solid var(--pharao-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1.5rem;
}

.btn-pharao:hover {
    background: linear-gradient(135deg, var(--btn-gradient-hover-start) 0%, var(--btn-gradient-hover-end) 100%);
    color: var(--btn-primary-text-hover);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

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

.btn-pharao:disabled {
    background: #666;
    border-color: #666;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-outline-pharao {
    background-color: transparent;
    color: var(--pharao-gold);
    border: 1px solid var(--pharao-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-outline-pharao:hover {
    background-color: var(--pharao-gold);
    color: var(--pharao-dark);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* Button Sizes */
.btn-pharao.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.btn-pharao.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: rgba(20, 17, 10, 0.6);
    border-radius: 8px;
}

.card.border-pharao {
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card-header {
    background: rgba(212, 175, 55, 0.08);
    font-family: "Cinzel", serif;
}

.card-header.border-pharao {
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

/* ============================================
   BORDERS & UTILITIES
   ============================================ */
.border-pharao {
    border-color: var(--pharao-gold) !important;
}

.border-pharao-muted {
    border-color: rgba(212, 175, 55, 0.3) !important;
}

.border-pharao-muted:focus {
    border-color: var(--pharao-gold) !important;
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

/* Text Colors */
.text-pharao {
    color: var(--pharao-gold) !important;
}

.text-pharao-light {
    color: var(--pharao-sand) !important;
}

.text-pharao-muted {
    color: rgba(212, 175, 55, 0.6) !important;
}

/* Background Colors */
.bg-pharao {
    background-color: var(--pharao-gold) !important;
    color: var(--pharao-dark) !important;
}

.bg-pharao-dark {
    background-color: var(--pharao-dark) !important;
}

.bg-pharao-blue {
    background-color: var(--pharao-blue) !important;
}

/* ============================================
   TABLES
   ============================================ */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(212, 175, 55, 0.2);
}

.table-dark th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--pharao-gold);
    font-weight: 600;
}

.table-dark td {
    vertical-align: middle;
}

.table-hover > tbody > tr:hover {
    background-color: rgba(212, 175, 55, 0.1) !important;
    --bs-table-hover-bg: rgba(212, 175, 55, 0.1);
}

/* ============================================
   FORMS
   ============================================ */
.form-control,
.form-select {
    background-color: rgba(15, 13, 8, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--pharao-sand);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(15, 13, 8, 0.95);
    border-color: var(--pharao-gold);
    color: var(--pharao-sand);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.form-control::placeholder {
    color: rgba(244, 228, 188, 0.5);
}

.form-label {
    color: var(--pharao-gold);
    font-weight: 500;
}

/* Input Groups */
.input-group-text {
    background-color: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--pharao-gold);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: 8px;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.3);
    color: var(--pharao-info);
}

.alert-success {
    background-color: rgba(0, 108, 22, 0.15);
    border-color: rgba(0, 108, 22, 0.4);
    color: var(--pharao-success-light);
}

.alert-warning {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--pharao-gold);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
    color: var(--pharao-danger);
}

/* ============================================
   BADGES
   ============================================ */
.badge.bg-pharao {
    background-color: var(--pharao-gold) !important;
    color: var(--pharao-dark);
}

.badge.bg-pharao-outline {
    background-color: transparent;
    border: 1px solid var(--pharao-gold);
    color: var(--pharao-gold);
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    height: 20px;
}

.progress-bar {
    transition: width 0.5s ease;
}

.progress-bar.bg-pharao {
    background: linear-gradient(90deg, var(--pharao-gold-dark) 0%, var(--pharao-gold) 100%) !important;
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, var(--pharao-success) 0%, var(--pharao-success-light) 100%) !important;
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
    background-color: rgba(20, 17, 10, 0.97);
    border: 1px solid rgba(212, 175, 55, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.05);
}

.modal-header .modal-title {
    font-family: "Cinzel", serif;
    color: var(--pharao-gold);
}

.modal-footer {
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    background: rgba(15, 13, 8, 0.5);
}

.btn-close {
    filter: invert(0.7) sepia(1) saturate(2) hue-rotate(15deg);
    opacity: 0.6;
}
.btn-close:hover { opacity: 1; }

/* ============================================
   TOOLTIPS
   ============================================ */
.tooltip-inner {
    background-color: var(--pharao-bg-medium);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--pharao-sand);
    max-width: 300px;
    padding: 8px 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: rgba(212, 175, 55, 0.4);
}

.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: rgba(212, 175, 55, 0.4);
}

.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: rgba(212, 175, 55, 0.4);
}

.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: rgba(212, 175, 55, 0.4);
}

/* ============================================
   SPINNERS
   ============================================ */
.spinner-border.text-pharao {
    color: var(--pharao-gold) !important;
}

.spinner-grow.text-pharao {
    color: var(--pharao-gold) !important;
}

/* ============================================
   RESOURCE BAR
   ============================================ */
.resource-bar {
    background: linear-gradient(180deg, rgba(15, 13, 8, 0.95) 0%, rgba(20, 17, 10, 0.9) 100%);
    padding: 10px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.resource-item:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: scale(1.02);
}

/* ============================================
   GAME SPECIFIC - FORSCHUNG/RESEARCH
   ============================================ */
.research-card {
    transition: all 0.3s ease;
}

.research-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.research-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.cost-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin: 2px;
    font-size: 0.8rem;
}

.cost-badge.insufficient {
    background: rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.active-banner,
.active-research-banner {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
}

/* Techtree */
.techtree-item {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.techtree-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-left-color: var(--pharao-gold);
}

.techtree-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.techtree-locked {
    opacity: 0.5;
}

.techtree-locked .techtree-img {
    filter: grayscale(100%);
}

/* Nav Pills für Techtree Tabs */
.nav-pills .nav-link {
    color: var(--pharao-sand);
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin: 0 2px;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--pharao-gold);
}

.nav-pills .nav-link.active {
    background: var(--pharao-gold);
    color: var(--pharao-dark);
    border-color: var(--pharao-gold);
}

/* ============================================
   GAME SPECIFIC - DEFENSE/VERTEIDIGUNG
   ============================================ */
.defense-card,
.building-card,
.troop-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.defense-card:hover,
.building-card:hover,
.troop-card:hover {
    background-color: rgba(212, 175, 55, 0.1) !important;
}

.defense-card.active,
.building-card.active,
.troop-card.active {
    background-color: rgba(212, 175, 55, 0.15) !important;
    border-left: 3px solid var(--pharao-gold);
}

.defense-image,
.building-image,
.troop-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.defense-image:hover,
.building-image:hover,
.troop-image:hover {
    border-color: var(--pharao-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.defense-image-large,
.building-image-large {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

/* Info Panel */
.info-panel {
    min-height: 400px;
}

/* Build Progress */
.build-progress {
    height: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.build-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pharao-success) 0%, var(--pharao-success-light) 100%);
    transition: width 0.5s ease;
}

.build-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    font-size: 0.85rem;
}

/* ============================================
   MAINFRAME & CONTAINERS
   ============================================ */
#mainframe {
    background-color: var(--pharao-dark);
    min-height: 100vh;
}

.container-fluid.p-0 {
    min-height: calc(100vh - 120px);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: linear-gradient(180deg, rgba(20, 17, 10, 0.9) 0%, rgba(15, 13, 8, 0.98) 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--pharao-gold) !important;
    text-decoration: none;
}

/* ============================================
   LEGACY COMPATIBILITY CLASSES
   ============================================ */
.norm1, .norm2, .normb, .normbc, .normc {
    font-size: 14px;
    color: var(--pharao-sand);
}

.norm2r {
    text-align: right;
}

.inputfieldhell {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.button250 {
    width: 250px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--pharao-gold) 0%, var(--pharao-gold-hover) 100%);
    border: none;
    color: var(--pharao-dark);
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button250:hover {
    background: linear-gradient(135deg, var(--pharao-gold-hover) 0%, var(--pharao-gold) 100%);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.button100 {
    width: 100px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--pharao-gold) 0%, var(--pharao-gold-hover) 100%);
    border: none;
    color: var(--pharao-dark);
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
}

.divlink {
    display: inline-block;
    padding: 5px 10px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    cursor: pointer;
    margin: 2px;
    transition: all 0.3s ease;
    color: var(--pharao-sand);
}

.divlink:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--pharao-gold);
    color: var(--pharao-gold);
}

.bg1_1 {
    background: rgba(212, 175, 55, 0.1);
    padding: 5px;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--pharao-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) var(--pharao-dark);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

.pulse-gold {
    animation: pulse-gold 2s infinite;
}

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

.shimmer {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(212, 175, 55, 0.2) 50%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

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

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .resource-item span.small {
        display: none;
    }
}

@media (max-width: 768px) {
    .defense-image,
    .building-image,
    .troop-image {
        width: 40px;
        height: 40px;
    }
    
    .btn-pharao {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .info-panel {
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .resource-item {
        padding: 2px 4px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar, footer, .btn {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}
