/* ========================================
   EXPEDITION-2 GRID LAYOUT (Stable Proportions)
   40% Zone View | 10% Event | 50% Bottom (3 columns)
   ======================================== */

.expedition-2-section {
    display: grid;
    grid-template-rows: 40% 10% 50%;
    width: 100%;
    height: calc(100vh - 42px); /* ⭐ Absolute Viewport-Höhe minus Tab-Bar */
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(to bottom, #2a1a3a, #1a0a2a);
}

/* ========================================
   ZONE VIEW (40% height, full width)
   ======================================== */
.expedition-2-zone-view {
    grid-row: 1;
    overflow-y: auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    box-sizing: border-box;
    min-height: 0; /* ⭐ Grid-Row kann schrumpfen */
}

#expedition-2-zone-title {
    font-size: 2.5em;
    color: #a78bfa;
    margin: 0 0 20px 0;
    text-align: center;
    text-shadow: 0 0 15px rgba(167, 139, 250, 0.6);
    font-weight: bold;
}

.zone-description {
    font-size: 1.3em;
    color: #c4b5fd;
    line-height: 1.8;
    text-align: center;
    font-style: italic;
    opacity: 0.9;
    margin: 0;
}

/* ========================================
   STAMINA STATE
   ======================================== */
.expedition-2-stamina-state {
    font-size: 1.1em;
    text-align: center;
    margin: 6px 0 16px 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.expedition-2-stamina-state.stamina-green {
    color: #4ade80;
}

.expedition-2-stamina-state.stamina-yellow {
    color: #facc15;
}

.expedition-2-stamina-state.stamina-orange {
    color: #fb923c;
}

.expedition-2-stamina-state.stamina-red {
    color: #f87171;
}

/* ========================================
   START BUTTON TOOLTIP
   ======================================== */
.expedition-2-stamina-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85em;
    line-height: 1.6;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin-bottom: 6px;
}

.expedition-2-stamina-tooltip .stamina-green {
    color: #4ade80;
}

.expedition-2-stamina-tooltip .stamina-yellow {
    color: #facc15;
}

.expedition-2-stamina-tooltip .stamina-red {
    color: #f87171;
}

/* ========================================
   EVENT TEXT (10% height, full width)
   ======================================== */
.expedition-2-event-container {
    grid-row: 2;
    overflow-y: auto;
    padding: 0;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    box-sizing: border-box;
    min-height: 0; /* ⭐ Grid-Row kann schrumpfen */
    display: flex;
    align-items: center; /* ⭐ Vertikal zentriert */
}

.event-text {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0 20px;
    color: #e9d5ff;
    font-size: 1.2em;
    line-height: 1.8;
    text-align: center;
    margin: 0;
}

/* ========================================
   BOTTOM AREA (50% height, 3 columns)
   50% Buttons | 25% Rucksack | 25% Allgemein
   ======================================== */
.expedition-2-bottom-area {
    grid-row: 3;
    display: grid;
    grid-template-columns: 50% 25% 25%;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(to bottom, #2a1a3a, #1a0a2a);
    overflow: hidden;
    box-sizing: border-box;
    min-height: 0; /* ⭐ Grid-Row kann schrumpfen */
}

/* ========================================
   LEFT COLUMN: BUTTONS (50% width)
   ======================================== */
.expedition-2-button-column {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

/* Choice Buttons Container (scrollable) */
.expedition-2-choices {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
    padding-right: 5px;
}

/* Individual Choice Button */
.expedition-2-choice-btn {
    background: linear-gradient(135deg, #6d28d9, #8b5cf6) !important;
    border: 2px solid #a78bfa !important;
    border-radius: 10px;
    padding: 20px 25px;
    color: white !important;
    font-size: 1.1em;
    cursor: pointer !important;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    min-height: 70px;
}

.expedition-2-choice-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
    border-color: #c4b5fd !important;
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.5);
}

.expedition-2-choice-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Disabled buttons */
button.expedition-2-choice-btn[disabled],
button.expedition-2-choice-btn:disabled {
    background: linear-gradient(135deg, #4a4a4a, #6a6a6a) !important;
    border-color: #888 !important;
    color: #aaa !important;
    cursor: not-allowed !important;
}

/* Button Crossfade States */
.expedition-2-choice-btn.btn-fading-out {
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
    pointer-events: none;
}

.expedition-2-choice-btn.btn-fading-in {
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
    pointer-events: none;
}

.expedition-2-choice-btn.btn-visible {
    opacity: 1;
    transition: opacity 0.35s ease-in-out;
}

/* Already examined items - green, still clickable */
button.expedition-2-choice-btn.already-examined {
    background: linear-gradient(135deg, #047857, #059669) !important;
    border-color: #10b981 !important;
    color: white !important;
    cursor: pointer !important;
}

button.expedition-2-choice-btn.already-examined:hover {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    border-color: #34d399 !important;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.5);
}

.choice-text {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.choice-tooltip {
    display: block;
    font-size: 0.9em;
    color: #e9d5ff;
    font-style: italic;
    opacity: 0.85;
    line-height: 1.5;
}

/* Button Selected Feedback (grüner Hintergrund) */
button.expedition-2-choice-btn.expedition-2-btn-selected {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    border-color: #34d399 !important;
    color: white !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6) !important;
}

/* Navigation Buttons (fixed at bottom of button column) */
.expedition-2-nav-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(139, 92, 246, 0.3);
}

.expedition-2-nav-btn {
    flex: 1;
    background: linear-gradient(135deg, #4c1d95, #6d28d9) !important;
    border: 2px solid #7c3aed !important;
    border-radius: 8px;
    padding: 15px 18px;
    color: white !important;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.expedition-2-nav-btn:hover:not([disabled]) {
    background: linear-gradient(135deg, #5b21b6, #7c3aed) !important;
    box-shadow: 0 6px 12px rgba(124, 58, 237, 0.4);
}

.expedition-2-nav-btn[disabled] {
    background: linear-gradient(135deg, #374151, #4b5563) !important;
    border-color: #6b7280 !important;
    cursor: not-allowed;
    opacity: 0.5;
}

.expedition-2-nav-btn:active:not([disabled]) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ========================================
   MIDDLE COLUMN: RUCKSACK (25% width)
   ======================================== */
.expedition-2-backpack-column {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.expedition-2-backpack-column h3 {
    color: #a78bfa;
    font-size: 1.2em;
    margin: 0 0 15px 0;
    text-align: center;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    padding-bottom: 10px;
}

.expedition-2-backpack-grid {
    display: grid;
    position: relative;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}

/* Grid cells (background) */
.expedition-2-backpack-grid .expedition-2-grid-cell {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.expedition-2-backpack-grid .expedition-2-grid-cell.empty {
    opacity: 0.3;
}

/* Grid items (draggable, positioned absolutely over grid) */
.expedition-2-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(167, 139, 250, 0.6);
    border-radius: 6px;
    cursor: grab;
    transition: all 0.15s ease;
    z-index: 2;
    user-select: none;
}

.expedition-2-grid-item:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: #a78bfa;
    transform: scale(1.05);
    z-index: 3;
}

.expedition-2-grid-item:active {
    cursor: grabbing;
}

/* Dragging state */
.expedition-2-dragging {
    opacity: 0.3 !important;
    border-style: dashed !important;
}

/* ========================================
   DRAG PREVIEW (custom, follows mouse)
   ======================================== */
.expedition-2-drag-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid rgba(167, 139, 250, 0.8);
    border-radius: 6px;
    pointer-events: none !important;
    z-index: 10000;
    backdrop-filter: blur(2px);
    transform: scale(1.1);
    transition: none;
}

.expedition-2-valid-position {
    border-color: #4caf50 !important;
    box-shadow: 0 0 16px rgba(76, 175, 80, 0.6);
}

.expedition-2-invalid-position {
    border-color: #e94560 !important;
    box-shadow: 0 0 16px rgba(233, 69, 96, 0.6);
}

/* ========================================
   RIGHT COLUMN: ALLGEMEIN (25% width)
   ======================================== */
.expedition-2-general-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    overflow-y: auto;
    box-sizing: border-box;
}

.expedition-2-general-column h3 {
    color: #a78bfa;
    font-size: 1.2em;
    margin: 0 0 10px 0;
    text-align: center;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    padding-bottom: 10px;
}

.expedition-2-general-btn {
    padding: 12px 15px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    text-align: left;
    font-size: 1em;
    transition: all 0.2s;
}

.expedition-2-general-btn:hover:not([disabled]) {
    background: rgba(139, 92, 246, 0.4);
    border-color: #a78bfa;
}

.expedition-2-general-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Drop zone hover feedback */
.expedition-2-general-btn.drag-over {
    transform: scale(1.03);
    outline: 2px dashed #a78bfa;
    outline-offset: 2px;
}

.expedition-2-general-btn[data-action="eat"].drag-over {
    background: rgba(76, 175, 80, 0.25);
    border-color: #4caf50;
    outline-color: #4caf50;
}

.expedition-2-general-btn[data-action="discard"].drag-over {
    background: rgba(233, 69, 96, 0.25);
    border-color: #e94560;
    outline-color: #e94560;
}

.expedition-2-general-btn.drop-invalid {
    animation: shakeDrop 0.3s ease-in-out;
}

@keyframes shakeDrop {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
.expedition-2-zone-view::-webkit-scrollbar,
.expedition-2-event-container::-webkit-scrollbar,
.expedition-2-choices::-webkit-scrollbar,
.expedition-2-backpack-grid::-webkit-scrollbar,
.expedition-2-general-column::-webkit-scrollbar {
    width: 8px;
}

.expedition-2-zone-view::-webkit-scrollbar-track,
.expedition-2-event-container::-webkit-scrollbar-track,
.expedition-2-choices::-webkit-scrollbar-track,
.expedition-2-backpack-grid::-webkit-scrollbar-track,
.expedition-2-general-column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.expedition-2-zone-view::-webkit-scrollbar-thumb,
.expedition-2-event-container::-webkit-scrollbar-thumb,
.expedition-2-choices::-webkit-scrollbar-thumb,
.expedition-2-backpack-grid::-webkit-scrollbar-thumb,
.expedition-2-general-column::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

.expedition-2-zone-view::-webkit-scrollbar-thumb:hover,
.expedition-2-event-container::-webkit-scrollbar-thumb:hover,
.expedition-2-choices::-webkit-scrollbar-thumb:hover,
.expedition-2-backpack-grid::-webkit-scrollbar-thumb:hover,
.expedition-2-general-column::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, 0.7);
}

/* ========================================
   TRANSITION ANIMATIONS
   ======================================== */

/* Fade Out — alte Inhalte verschwinden */
@keyframes expeditionFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.expedition-2-transition-out {
    animation: expeditionFadeOut 0.35s ease-in-out forwards;
    pointer-events: none;
}

/* Fade In — neue Inhalte erscheinen */
@keyframes expeditionFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.expedition-2-transition-in {
    animation: expeditionFadeIn 0.35s ease-in-out forwards;
}

/* Zone Transition — sanfterer Effekt bei Zonenwechsel */
@keyframes expeditionZoneOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.expedition-2-zone-transition-out {
    animation: expeditionZoneOut 0.4s ease-in-out forwards;
    pointer-events: none;
}

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

.expedition-2-zone-transition-in {
    animation: expeditionZoneIn 0.4s ease-in-out forwards;
}

/* Button Staggered Entrance (fade in place) */
@keyframes expeditionBtnFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.expedition-2-btn-entrance {
    opacity: 0;
    animation: expeditionBtnFadeIn 0.4s ease-out forwards;
}

/* ========================================
   UNLOCK SYSTEM - Hidden State
   ======================================== */
.expedition-2-hidden {
    display: none !important;
}

/* ========================================
   PREP PHASE — Inventory Grid & Status Bar
   ======================================== */

.expedition-2-prep-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Tab bar (Ausrüstung / Proviant / Funde) */
.expedition-2-prep-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.expedition-2-prep-tab {
    flex: 1;
    padding: 6px 4px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px 6px 0 0;
    color: #c4b5fd;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.expedition-2-prep-tab:hover {
    background: rgba(139, 92, 246, 0.25);
}

.expedition-2-prep-tab-active {
    background: rgba(139, 92, 246, 0.35);
    border-color: #a78bfa;
    color: #fff;
    font-weight: bold;
}

/* 5x3 inventory grid */
.expedition-2-prep-inventory-grid {
    display: none;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    flex: 1;
    overflow: hidden;
    padding: 2px;
}

.expedition-2-prep-inventory-grid-active {
    display: grid;
}

.expedition-2-prep-inventory-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 4px;
    font-size: 1.4em;
    cursor: pointer;
    position: relative;
    transition: all 0.15s;
    user-select: none;
    min-height: 50px;
}

.expedition-2-prep-inventory-cell:hover:not(.expedition-2-prep-inventory-empty):not(.expedition-2-prep-cell-packed) {
    background: rgba(139, 92, 246, 0.2);
    border-color: #a78bfa;
    transform: scale(1.08);
}

.expedition-2-prep-inventory-empty {
    opacity: 0.2;
    cursor: default;
}

.expedition-2-prep-cell-packed {
    opacity: 0.35;
    cursor: default;
    background: rgba(0, 0, 0, 0.3);
}

/* Count badge */
.expedition-2-prep-count-badge {
    position: absolute;
    bottom: 1px;
    right: 2px;
    font-size: 0.55em;
    background: rgba(0, 0, 0, 0.7);
    color: #e9d5ff;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.2;
    pointer-events: none;
}

/* Status bar (unpack all + start expedition) */
.expedition-2-prep-status-bar {
    display: flex;
    gap: 8px;
    padding: 8px 0 0 0;
    border-top: 1px solid rgba(139, 92, 246, 0.25);
    margin-top: 6px;
    flex-shrink: 0;
}

.expedition-2-prep-unpack-all-btn {
    flex: 1;
    padding: 8px 10px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    color: #c4b5fd;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.expedition-2-prep-unpack-all-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: #a78bfa;
    color: #fff;
}

.expedition-2-prep-start-btn {
    flex: 1;
    position: relative;
    padding: 8px 10px;
    background: linear-gradient(135deg, #059669, #10b981);
    border: 1px solid #34d399;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.expedition-2-prep-start-btn:hover:not([disabled]) {
    background: linear-gradient(135deg, #047857, #059669);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.expedition-2-prep-start-btn-disabled,
.expedition-2-prep-start-btn[disabled] {
    background: linear-gradient(135deg, #374151, #4b5563);
    border-color: #6b7280;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Prep action buttons (right column) */
.expedition-2-prep-action-btn {
    padding: 12px 15px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    text-align: left;
    font-size: 1em;
    transition: all 0.2s;
}

.expedition-2-prep-action-btn:hover:not([disabled]) {
    background: rgba(139, 92, 246, 0.4);
    border-color: #a78bfa;
}

.expedition-2-prep-action-btn[disabled] {
    opacity: 0.4;
    cursor: default;
}

/* Destination resource tags in event text */
.destination-resource {
    display: inline-block;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    padding: 2px 8px;
    margin: 0 2px;
    font-size: 0.9em;
    color: #e9d5ff;
}

/* Responsive breakpoint entfernt - Desktop-only Layout */
