/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BODY & BACKGROUND ===== */
body {
    font-family: 'Open Sans', sans-serif;
    color: #e0d9c0;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/b/buero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.9) contrast(1.1);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10,14,26,0.15) 0%, rgba(10,14,26,0.1) 100%);
    z-index: -1;
}

/* ===== APP LAYOUT ===== */
.app {
    display: flex;
    height: 100vh;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ===== HEADER ===== */
.header {
    background: rgba(5, 7, 15, 0.7);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 100;
}

.logo-small {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: #d4af37;
}

.player-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.4rem 1rem;
    border-radius: 20px;
}

.stat-value {
    font-weight: bold;
    color: #d4af37;
}

.guest-badge {
    background: rgba(212, 175, 55, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.guest-badge:hover {
    background: rgba(212, 175, 55, 0.4);
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cinzel', serif;
}

.nav-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    transform: translateY(-2px);
}

/* ===== HAMBURGER MENU ===== */
.hamburger-menu {
    position: relative;
    display: inline-block;
}

.hamburger-icon {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    color: #d4af37;
    line-height: 1;
}

.hamburger-icon:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    transform: scale(1.05);
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #0f1422;
    border: 1px solid #d4af37;
    border-radius: 12px;
    min-width: 250px;
    z-index: 2000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.menu-dropdown.active {
    display: block;
    animation: menuFadeIn 0.2s ease;
}

.menu-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    cursor: pointer;
    transition: background 0.2s;
    color: #e0d9c0;
    font-size: 0.9rem;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.menu-item.danger {
    color: #ff6b6b;
}

.menu-item.danger:hover {
    background: rgba(255, 107, 107, 0.1);
}

.menu-divider {
    height: 1px;
    background: rgba(212, 175, 55, 0.2);
    margin: 0.5rem 0;
}

/* ===== SETTINGS MODAL ===== */
.settings-section {
    text-align: left;
    padding: 0.5rem 0;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.settings-option label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #e0d9c0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #d4af37;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

select {
    background: #1a1f2e;
    color: #e0d9c0;
    border: 1px solid #d4af37;
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
}

select:hover {
    background: #2a2f3e;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 1rem;
    gap: 1rem;
}

/* ===== SHIPS PANEL ===== */
.ships-panel {
    width: 320px;
    background: rgba(10, 14, 26, 0.55);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1rem;
}

.panel-title {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.ship-card {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.ship-card:hover {
    background: rgba(212, 175, 55, 0.15);
    transform: translateX(5px);
}

.ship-card.active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.2);
}

.ship-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.ship-location {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.ship-cargo {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.8rem;
}

.cargo-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.cargo-item {
    background: rgba(212, 175, 55, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.cargo-item:hover {
    background: rgba(212, 175, 55, 0.4);
    transform: scale(1.05);
}

.capacity-bar {
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: #d4af37;
    width: 0%;
}

.small-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    background: rgba(212, 175, 55, 0.3);
    color: #d4af37;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.small-btn:hover {
    background: rgba(212, 175, 55, 0.5);
    transform: scale(1.02);
}

/* ===== CITY PANEL ===== */
.city-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: rgba(10, 14, 26, 0.55);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 1.5rem;
}

.city-header {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(0, 0, 0, 0.25));
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.city-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #d4af37;
}

.market-table {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.market-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    background: rgba(212, 175, 55, 0.15);
    padding: 0.8rem 1rem;
    font-weight: bold;
    color: #d4af37;
}

.market-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    cursor: pointer;
    transition: background 0.2s;
}

.market-row:hover {
    background: rgba(212, 175, 55, 0.1);
}

.price-buy {
    color: #4caf50;
}

.price-sell {
    color: #ff9800;
}

.warehouse-panel {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 1rem;
}

.warehouse-goods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.warehouse-item {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* ===== NOTIFICATIONS ===== */
.notifications {
    position: fixed;
    top: 80px;
    right: 1em;
    z-index: 10001;  /* Höher als alles andere */
    pointer-events: none;  /* Klicks gehen durch */
}
.notification {
    background: rgba(0, 0, 0, 0.9);
    border-left: 4px solid #d4af37;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    animation: slideIn 0.3s ease;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: auto;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-scout {
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.2), rgba(139, 195, 74, 0.1));
    border-left: 4px solid #8bc34a;
}

.notification-icon {
    font-size: 1.5rem;
    margin-right: 0.8rem;
}

.notification-content {
    flex: 1;
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay .modal-content {
    background: #0f1422;
    border: 1px solid #d4af37;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-overlay .modal-content h3 {
    color: #d4af37;
    margin-bottom: 1rem;
}

.modal-overlay .modal-content button {
    background: rgba(212, 175, 55, 0.3);
    color: #d4af37;
    border: 1px solid #d4af37;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-overlay .modal-content button:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* ===== FULLSCREEN ===== */
.fullscreen-btn {
    cursor: pointer;
    transition: all 0.3s;
}

.fullscreen-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    transform: scale(1.05);
}

:-webkit-full-screen {
    background-color: #0a0e1a;
}

:-moz-full-screen {
    background-color: #0a0e1a;
}

:fullscreen {
    background-color: #0a0e1a;
}

:fullscreen .main-content {
    padding: 1.5rem;
}

:fullscreen .ships-panel {
    width: 350px;
}

/* ===== SCROLLBAR STYLES ===== */
.ships-panel::-webkit-scrollbar {
    width: 8px;
}

.ships-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.ships-panel::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

.ships-panel::-webkit-scrollbar-thumb:hover {
    background: #ffd966;
}

.ships-panel {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(0, 0, 0, 0.3);
}

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

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

/* ===== MODES ===== */
/* Compact Mode */
body.compact-mode .ship-card {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

body.compact-mode .panel-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

body.compact-mode .city-title {
    font-size: 1.2rem;
}

body.compact-mode .market-row,
body.compact-mode .market-header {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* No Animations Mode */
body.no-animations * {
    animation: none !important;
    transition: none !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .ships-panel {
        width: 260px;
    }

    .market-header,
    .market-row {
        font-size: 0.75rem;
    }

    .city-title {
        font-size: 1.2rem;
    }

    .header {
        flex-wrap: wrap;
    }

    .nav-buttons {
        order: 2;
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
    }

    .player-stats {
        order: 1;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .stat {
        padding: 0.2rem 0.6rem;
        font-size: 0.8rem;
    }

    .hamburger-icon {
        padding: 6px 10px;
        font-size: 1rem;
    }

    .menu-dropdown {
        min-width: 200px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .ships-panel {
        width: 220px;
    }

    .player-stats {
        gap: 0.5rem;
    }

    .stat {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    .guest-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}
