/* ============================================
   VENTURE GAME UI - Shared Styles
   ============================================
   Common styles for in-game panels and UI components.
   Import via App.razor: <link href="/game.css" rel="stylesheet"/>
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (Theme Variables)
   ============================================ */
:root {
    /* Base colors */
    --game-bg-dark: rgba(12, 14, 24, 0.96);
    --game-bg-darker: rgba(0, 0, 0, 0.25);
    --game-bg-card: rgba(30, 35, 50, 0.6);
    --game-bg-input: rgba(0, 0, 0, 0.3);
    
    /* Accent colors */
    --game-accent-gold: rgba(200, 160, 100, 1);
    --game-accent-gold-dim: rgba(200, 160, 100, 0.5);
    --game-accent-gold-subtle: rgba(200, 160, 100, 0.25);
    --game-accent-blue: rgba(100, 120, 180, 1);
    --game-accent-blue-dim: rgba(100, 120, 180, 0.5);
    
    /* Text colors */
    --game-text-primary: #e0d8c8;
    --game-text-secondary: #a09888;
    --game-text-muted: #7888a0;
    --game-text-hint: #6878a0;
    
    /* Status colors */
    --game-success: #90d890;
    --game-success-bg: rgba(80, 160, 80, 0.15);
    --game-error: #e89090;
    --game-error-bg: rgba(180, 60, 60, 0.15);
    --game-warning: #e8c878;
    --game-warning-bg: rgba(200, 160, 80, 0.15);
    
    /* Fonts */
    --game-font-display: 'Cinzel', 'Georgia', 'Times New Roman', serif;
    --game-font-body: 'Georgia', 'Times New Roman', serif;
    --game-font-mono: 'JetBrains Mono', 'Consolas', monospace;
    
    /* Transitions */
    --game-transition-fast: 0.15s ease;
    --game-transition-normal: 0.25s ease;
}

/* ============================================
   PANEL BASE STYLES
   ============================================ */
.game-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--game-bg-dark);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity var(--game-transition-normal), 
                visibility var(--game-transition-normal), 
                transform var(--game-transition-normal);
}

.game-panel.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* ============================================
   PANEL HEADER
   ============================================ */
.game-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--game-accent-gold-dim);
    flex-shrink: 0;
}

.game-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--game-text-primary);
    letter-spacing: 0.5px;
    font-family: var(--game-font-display);
}

.game-panel-title-icon {
    font-size: 18px;
}

/* ============================================
   CLOSE BUTTON
   ============================================ */
.game-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--game-text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--game-transition-fast);
}

.game-close-btn:hover {
    background: rgba(255, 80, 80, 0.2);
    border-color: rgba(255, 80, 80, 0.4);
    color: #ff9090;
}

/* ============================================
   SCROLLABLE CONTENT
   ============================================ */
.game-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.game-scroll::-webkit-scrollbar {
    width: 6px;
}

.game-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.game-scroll::-webkit-scrollbar-thumb {
    background: var(--game-accent-gold-dim);
    border-radius: 3px;
}

.game-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--game-accent-gold);
}

/* ============================================
   PANEL FOOTER
   ============================================ */
.game-panel-footer {
    padding: 10px 20px;
    background: var(--game-bg-darker);
    border-top: 1px solid rgba(200, 160, 100, 0.12);
    text-align: center;
    flex-shrink: 0;
}

.game-hint-text {
    color: var(--game-text-hint);
    font-size: 11px;
    letter-spacing: 0.2px;
}

/* ============================================
   FORM INPUTS
   ============================================ */
.game-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.game-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.game-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--game-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-input,
.game-select,
.game-textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--game-bg-input);
    border: 1px solid var(--game-accent-gold-subtle);
    border-radius: 6px;
    color: var(--game-text-primary);
    font-size: 13px;
    transition: all var(--game-transition-fast);
    box-sizing: border-box;
}

.game-input:focus,
.game-select:focus,
.game-textarea:focus {
    outline: none;
    border-color: var(--game-accent-gold-dim);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 12px rgba(200, 160, 100, 0.15);
}

.game-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: var(--game-font-body);
    line-height: 1.5;
}

.game-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a09888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.game-input-hint {
    font-size: 11px;
    color: var(--game-text-muted);
    font-style: italic;
}

/* Range input */
.game-range {
    width: 100%;
    height: 6px;
    background: var(--game-bg-input);
    border-radius: 3px;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.game-range::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(145deg, #c9a860, #a08040);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.game-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(145deg, #c9a860, #a08040);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Checkbox */
.game-checkbox-group {
    flex-direction: row;
    align-items: center;
}

.game-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #c0b8a0;
}

.game-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #c9a860;
    cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */
.game-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--game-bg-card);
    border: 1px solid var(--game-accent-gold-dim);
    border-radius: 8px;
    color: #d8c8a0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--game-transition-fast);
}

.game-btn:hover:not(:disabled) {
    background: rgba(50, 55, 70, 0.9);
    border-color: var(--game-accent-gold);
    transform: translateY(-1px);
}

.game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-btn--primary {
    background: linear-gradient(145deg, rgba(180, 140, 60, 0.25) 0%, rgba(140, 100, 40, 0.25) 100%);
    border-color: var(--game-accent-gold-dim);
}

.game-btn--primary:hover:not(:disabled) {
    background: linear-gradient(145deg, rgba(200, 160, 80, 0.35) 0%, rgba(160, 120, 60, 0.35) 100%);
    border-color: rgba(220, 180, 120, 0.7);
}

.game-btn--secondary {
    background: rgba(25, 30, 45, 0.8);
    border-color: var(--game-accent-blue-dim);
    color: #b0c0d8;
}

.game-btn--secondary:hover:not(:disabled) {
    background: rgba(35, 45, 65, 0.9);
    border-color: var(--game-accent-blue);
}

.game-btn-row {
    display: flex;
    gap: 10px;
}

.game-btn-row .game-btn {
    flex: 1;
}

/* ============================================
   ALERTS / MESSAGES
   ============================================ */
.game-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 12px;
}

.game-alert--success {
    background: var(--game-success-bg);
    border: 1px solid rgba(100, 180, 100, 0.3);
    color: var(--game-success);
}

.game-alert--error {
    background: var(--game-error-bg);
    border: 1px solid rgba(200, 80, 80, 0.3);
    color: var(--game-error);
}

.game-alert--warning {
    background: var(--game-warning-bg);
    border: 1px solid rgba(200, 160, 80, 0.3);
    color: var(--game-warning);
}

.game-alert-icon {
    font-size: 16px;
}

.game-alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-alert-close:hover {
    opacity: 1;
}

/* ============================================
   LOADING STATE
   ============================================ */
.game-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 16px;
    text-align: center;
}

.game-loading-spinner {
    font-size: 32px;
    animation: game-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes game-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.game-loading p {
    color: var(--game-text-muted);
    font-size: 14px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.game-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    text-align: center;
}

.game-empty-icon {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.game-empty p {
    margin: 4px 0;
    color: var(--game-text-muted);
    font-size: 14px;
}

.game-empty .game-input-hint {
    font-size: 12px;
    opacity: 0.7;
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */
.game-section-header {
    font-family: var(--game-font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--game-accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(200, 160, 100, 0.2);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.game-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 160, 100, 0.3), transparent);
    margin: 16px 0;
}

/* ============================================
   STATS DISPLAY
   ============================================ */
.game-stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.game-stat-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--game-bg-card);
    border: 1px solid rgba(200, 160, 100, 0.15);
    border-radius: 8px;
}

.game-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #e8d8b0;
}

.game-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--game-text-muted);
    margin-top: 4px;
}

/* ============================================
   CARD / LIST ITEMS
   ============================================ */
.game-card {
    background: var(--game-bg-card);
    border: 1px solid rgba(200, 160, 100, 0.15);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.game-card:last-child {
    margin-bottom: 0;
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.game-card-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--game-text-primary);
}

.game-card-body {
    font-size: 13px;
    color: #c8d0d8;
    line-height: 1.5;
    font-family: var(--game-font-body);
}

/* ============================================
   TAGS / BADGES
   ============================================ */
.game-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(100, 140, 180, 0.2);
    color: #a0b8c8;
    border: 1px solid rgba(100, 140, 180, 0.3);
}

.game-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.game-badge--active {
    background: rgba(180, 140, 220, 0.2);
    color: #c0a8e0;
    border: 1px solid rgba(180, 140, 220, 0.3);
}

.game-badge--resolved {
    background: rgba(100, 180, 100, 0.2);
    color: var(--game-success);
    border: 1px solid rgba(100, 180, 100, 0.3);
}

.game-badge--high {
    background: rgba(200, 80, 80, 0.25);
    color: var(--game-error);
}

.game-badge--medium {
    background: rgba(200, 160, 80, 0.25);
    color: var(--game-warning);
}

.game-badge--low {
    background: rgba(80, 140, 200, 0.25);
    color: #88c0e8;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 600px) {
    .game-panel-header {
        padding: 10px 14px;
    }
    
    .game-panel-title {
        font-size: 14px;
    }
    
    .game-scroll {
        padding: 12px 14px;
    }
    
    .game-form-row {
        grid-template-columns: 1fr;
    }
    
    .game-btn-row {
        flex-direction: column;
    }
    
    .game-panel-footer {
        padding: 8px 14px;
    }
    
    .game-hint-text {
        font-size: 10px;
    }
}

