/* ==========================================
   MAIN STYLES - Base & Layout
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #8b0000;
    --color-secondary: #ffd700;
    --color-bg: #000000;
    --color-text: #ffffff;
    --color-success: #00ff00;
    --color-error: #ff0000;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Crimson Text', serif;
    min-height: 100vh;
    user-select: none;
    overflow-x: hidden;
    transition: opacity 0.5s ease;
    opacity: 0;
}

body.loaded {
    opacity: 1;
}

/* Fonts */
.cinzel {
    font-family: 'Cinzel', serif;
}

.crimson {
    font-family: 'Crimson Text', serif;
}

/* Full page container */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Glass Effect */
.glass {
    background: rgba(10, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 0, 0, 0.3);
}

/* Atmospheric Effects */
.fog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 200px 100px rgba(0,0,0,0.9);
    pointer-events: none;
    z-index: 2;
}

/* Header */
.game-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(139, 0, 0, 0.5);
    padding: 1rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.room-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.room-icon {
    font-size: 2rem;
}

.room-info h1 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.room-number {
    font-size: 0.75rem;
    color: #666;
}

.game-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.timer {
    font-size: 1rem;
    color: #999;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(50, 50, 50, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b0000, #ffd700);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Main Content */
.room-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    position: relative;
    z-index: 10;
}

.room-description {
    background: rgba(10, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    line-height: 1.8;
    color: #ccc;
}

/* Objects Grid */
.objects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 8rem;
}

.object-card {
    background: rgba(10, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.object-card:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(139, 0, 0, 0.8);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.5);
}

.object-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.object-name {
    font-size: 1.125rem;
    color: #ccc;
    font-weight: 600;
}

/* Inventory (bottom bar) */
.inventory-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(139, 0, 0, 0.5);
    padding: 1.5rem;
    z-index: 40;
}

.inventory-content {
    max-width: 1400px;
    margin: 0 auto;
}

.inventory-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.inventory-header h3 {
    font-size: 1.25rem;
    color: var(--color-primary);
}

.inventory-items {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.inventory-item {
    flex-shrink: 0;
    background: rgba(139, 0, 0, 0.2);
    border: 2px solid rgba(139, 0, 0, 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    min-width: 100px;
}

.inventory-item-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.inventory-item-name {
    font-size: 0.75rem;
    color: #999;
}

.inventory-empty {
    color: #666;
    font-style: italic;
    padding: 1rem;
}

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

::-webkit-scrollbar-track {
    background: #1a0000;
}

::-webkit-scrollbar-thumb {
    background: #8b0000;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b00000;
}

/* Responsive */
@media (max-width: 768px) {
    .room-content {
        padding: 1rem;
    }

    .objects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .object-card {
        padding: 1.5rem;
    }

    .object-icon {
        font-size: 3rem;
    }

    .room-description {
        font-size: 1rem;
        padding: 1.5rem;
    }
}
