/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #2d1a06 0%, #3a2a13 60%, #4a3728 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    color: #f9f6f2;
    font-size: 18px;
    font-weight: 500;
}

.game-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px;
}

/* Header Styles */
.game-header {
    background: linear-gradient(90deg, #2d1a06 0%, #3a2a13 100%);
    border: 3px solid #daa520;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px 0 rgba(44, 22, 0, 0.18);
    border-bottom: 2px solid #6b4a1b;
    padding-bottom: 8px;
    text-align: center;
    color: #fff;
}

.game-header h1 {
    font-size: 1.9em;
    color: #daa520;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 5px;
}

.player-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    background: rgba(44, 22, 0, 0.18);
    border-radius: 8px;
    box-shadow: 0 2px 8px 0 rgba(44, 22, 0, 0.10);
    padding: 10px 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 1.15em;
    font-weight: 600;
    color: #fff;
    transition: box-shadow 0.2s;
}
.player-stats span {
    background: rgba(0,0,0,0.3);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
    border: 1px solid #daa520;
    font-size: 0.85em;
    transition: color 0.2s, text-shadow 0.2s, transform 0.15s;
    cursor: pointer;
    color: #fff;
    font-weight: 600;
}
.player-stats span:hover {
    color: #ffe4b5;
    text-shadow: 0 0 8px #fff, 0 0 2px #ffe4b5;
    transform: scale(1.05);
}
#bard-stats {
    background: linear-gradient(90deg, #2d1a06 0%, #3a2a13 100%);
    border-radius: 6px;
    padding: 8px 18px;
    margin-left: 18px;
    box-shadow: 0 2px 8px 0 rgba(191, 167, 106, 0.10);
    font-weight: bold;
    letter-spacing: 0.02em;
    border: 1.5px solid #6b4a1b;
    color: #fff;
    font-size: 1.08em;
    transition: box-shadow 0.2s, background 0.2s, transform 0.15s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    max-width: calc(100vw - 200px);
    overflow: hidden;
}
#bard-stats .stat-pop {
    animation: statPop 0.4s cubic-bezier(.4,2,.6,1) 1;
}
#bard-stats span {
    color: #fff !important;
    font-weight: 700;
    margin-right: 8px;
    white-space: nowrap;
}
#bard-stats .skill-hint {
    font-size: 0.85em;
    color: #ccc;
    margin-left: 12px;
    font-weight: normal;
    white-space: nowrap;
    flex-shrink: 0;
}
@keyframes statPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.20); color: #fff; text-shadow: 0 0 8px #fff; }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Main Game Area */
.game-main {
    background: linear-gradient(45deg, #3d2f20 0%, #5a4a38 100%);
    border: 2px solid #8b4513;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Phase Styles */
.phase {
    display: block;
}

.phase.hidden {
    display: none;
}

.phase h2 {
    color: #daa520;
    font-size: 1.3em;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    border-bottom: 2px solid #8b4513;
    padding-bottom: 6px;
}

/* Town Info */
.town-info {
    background: rgba(139, 69, 19, 0.2);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
}

.town-info h3 {
    color: #daa520;
    margin-bottom: 8px;
}

/* Location Styles */
.locations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px 0 rgba(44, 22, 0, 0.07);
}

.location {
    background: linear-gradient(45deg, #654321 0%, #8b4513 100%);
    border: 2px solid #a0522d;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.location:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-color: #daa520;
}

.location h4 {
    color: #daa520;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.location p {
    color: #f4e4c1;
    font-size: 0.9em;
}

/* Information List */
.gathered-info {
    background: rgba(0,0,0,0.2);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    min-height: 60px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px 0 rgba(44, 22, 0, 0.07);
}

.gathered-info h3 {
    color: #daa520;
    margin-bottom: 10px;
}

.info-item {
    background: rgba(139, 69, 19, 0.3);
    border-left: 4px solid #daa520;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.info-item.confirmed {
    border-left-color: #32cd32;
}

.info-item.rumored {
    border-left-color: #ffa500;
}

.info-item.made-up {
    border-left-color: #dc143c;
}

.info-source {
    font-size: 0.8em;
    color: #ccc;
    font-style: italic;
}

/* Audience Section */
.audience-section {
    background: rgba(0,0,0,0.2);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px 0 rgba(44, 22, 0, 0.07);
}

.audience-section h3 {
    color: #daa520;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.audience-member {
    background: rgba(139, 69, 19, 0.3);
    border-left: 4px solid #daa520;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.audience-member-info strong {
    color: #f4e4c1;
    font-size: 1.0em;
}

.audience-member-details {
    color: #ccc;
    font-size: 0.9em;
    margin: 5px 0;
    font-style: italic;
}

.audience-preferences {
    color: #daa520;
    font-size: 0.85em;
    margin: 3px 0;
}

.relationship {
    color: #32cd32;
    font-size: 0.8em;
    margin-top: 3px;
}

/* Story Crafting */
.story-crafting {
    margin-bottom: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px 0 rgba(44, 22, 0, 0.07);
}

.act-section {
    background: rgba(0,0,0,0.2);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.act-section h3 {
    color: #daa520;
    margin-bottom: 10px;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.choice {
    background: linear-gradient(45deg, #654321 0%, #8b4513 100%);
    border: 2px solid #a0522d;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice:hover {
    border-color: #daa520;
    transform: translateX(5px);
}

.choice.selected {
    border-color: #daa520;
    background: linear-gradient(45deg, #8b4513 0%, #a0522d 100%);
}

.choice-text {
    font-weight: bold;
    color: #f4e4c1;
    margin-bottom: 5px;
}

.choice-source {
    font-size: 0.8em;
    color: #ccc;
    font-style: italic;
}

.selected-choice {
    margin-top: 10px;
    padding: 10px;
    background: rgba(218, 165, 32, 0.2);
    border-radius: 5px;
    border-left: 4px solid #daa520;
}

/* Story Preview */
.story-preview {
    background: rgba(0,0,0,0.3);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    min-height: 80px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px 0 rgba(44, 22, 0, 0.07);
}

.story-preview h3 {
    color: #daa520;
    margin-bottom: 15px;
}

#story-preview-text {
    font-style: italic;
    line-height: 1.8;
    color: #f4e4c1;
}

/* Buttons */
button {
    background: linear-gradient(90deg, #6b4a1b 0%, #bfa76a 100%);
    color: #f4e4c1;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1em;
    padding: 10px 22px;
    margin: 6px 0;
    box-shadow: 0 2px 6px 0 rgba(44, 22, 0, 0.10);
    transition: background 0.18s, color 0.18s, transform 0.13s;
    cursor: pointer;
    outline: none;
}

button:hover:not(:disabled) {
    background: linear-gradient(90deg, #bfa76a 0%, #6b4a1b 100%);
    color: #2d1a06;
    transform: scale(1.05);
    box-shadow: 0 0 8px #d4af3755;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #3a2a13 0%, #4a3728 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(44, 22, 0, 0.18);
    border: 2px solid #6b4a1b;
    padding: 20px 16px 16px 16px;
    color: #fff;
    position: relative;
    z-index: 1001;
    animation: modalPop 0.5s cubic-bezier(.4,2,.6,1) 1;
    font-size: 1em;
    font-weight: 500;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}
@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.npc-option {
    margin: 8px 0;
    padding: 8px;
    background: rgba(139, 69, 19, 0.22);
    border-radius: 5px;
    font-size: 0.98em;
}
@media (max-width: 700px) {
  .modal-content {
    max-width: 98vw;
    padding: 8px 2vw;
    font-size: 0.98em;
  }
}
.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 2em;
    color: #ffd700;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.close-modal-btn:hover {
    color: #fff;
}

/* Performance Results */
.audience-reaction, .earnings, .consequences {
    background: rgba(0,0,0,0.2);
    border: 1px solid #8b4513;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px 0 rgba(44, 22, 0, 0.07);
}

.audience-reaction h3, .earnings h3, .consequences h3 {
    color: #daa520;
    margin-bottom: 10px;
}

.reaction-item {
    background: rgba(139, 69, 19, 0.3);
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 4px solid #32cd32;
}

.reaction-item.negative {
    border-left-color: #dc143c;
}

.reaction-item.neutral {
    border-left-color: #ffa500;
}

.reaction-item.divider {
    background: rgba(218, 165, 32, 0.2);
    border-left-color: #daa520;
    color: #daa520;
    text-align: center;
    font-weight: bold;
    font-style: italic;
}

.earnings-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.3);
}

.earnings-item:last-child {
    border-bottom: none;
    font-weight: bold;
    color: #daa520;
}

/* Rumor Info */
.rumor-info {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid #daa520;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    min-height: 60px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid #daa520;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px 0 rgba(44, 22, 0, 0.07);
}

.rumor-info h3 {
    color: #daa520;
    margin-bottom: 10px;
}

.rumor-item {
    background: rgba(255, 215, 0, 0.15);
    border-left: 4px solid #ffa500;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.rumor-item .rumor-source {
    font-size: 0.8em;
    color: #b8860b;
    font-style: italic;
}

/* Footer */
.game-footer {
    background: linear-gradient(45deg, #8b4513 0%, #a0522d 100%);
    border: 2px solid #daa520;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    color: #f4e4c1;
}

.objective {
    font-size: 1.1em;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(90deg, #4a3728 0%, #8b7355 100%);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px 0 rgba(44, 22, 0, 0.10);
    margin-bottom: 8px;
    padding: 4px 0 2px 0;
    display: flex;
    gap: 2px;
    overflow: hidden;
    background: linear-gradient(90deg, #3a2a13 0%, #4a3728 100%);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px 0 rgba(44, 22, 0, 0.10);
    margin-bottom: 8px;
    padding: 4px 0 2px 0;
    display: flex;
    gap: 2px;
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    background: linear-gradient(90deg, #6b4a1b 0%, #bfa76a 100%);
    border: none;
    border-radius: 6px 6px 0 0;
    color: #f4e4c1;
    font-weight: bold;
    font-size: 1.08em;
    padding: 10px 24px;
    margin-right: 2px;
    box-shadow: 0 2px 6px 0 rgba(44, 22, 0, 0.10);
    transition: background 0.18s, color 0.18s, transform 0.13s;
    cursor: pointer;
    outline: none;
}

.tab-btn.active, .tab-btn:focus {
    background: linear-gradient(90deg, #bfa76a 0%, #6b4a1b 100%);
    color: #2d1a06;
    transform: scale(1.05);
    box-shadow: 0 0 8px #d4af3755;
}

.tab-content {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 6px;
    }
    
    .player-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .locations {
        grid-template-columns: 1fr;
    }
    
    .game-header h1 {
        font-size: 1.6em;
    }
    
    .phase h2 {
        font-size: 1.2em;
    }
    
    .modal-content {
        width: 95%;
        padding: 12px;
    }
}

@media (max-width: 600px) {
    .game-main {
        padding: 0 2px;
    }
    .tab-bar {
        font-size: 0.95em;
    }
    .tab-btn {
        padding: 10px 0;
        font-size: 1em;
    }
    .tab-content {
        padding: 0 2px;
    }
}

/* Event Log Styles */
.event-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.filter-btn {
    background: linear-gradient(90deg, #6b4a1b 0%, #bfa76a 100%);
    color: #f4e4c1;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, #8b5c1e 0%, #daa520 100%);
    color: #fffbe6;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1em;
    padding: 10px 22px;
    margin: 6px 0;
    box-shadow: 0 2px 6px 0 rgba(44, 22, 0, 0.10);
    transition: background 0.18s, color 0.18s, transform 0.13s;
    cursor: pointer;
    outline: none;
}

.filter-btn:hover {
    background: linear-gradient(90deg, #bfa76a 0%, #6b4a1b 100%);
    color: #2d1a06;
    transform: scale(1.05);
    box-shadow: 0 0 8px #d4af3755;
}

.filter-btn.active {
    background: rgba(218, 165, 32, 0.3);
    border-color: #daa520;
    color: #daa520;
    font-weight: bold;
    background: rgba(218, 165, 32, 0.3);
    border-color: #daa520;
    color: #daa520;
    font-weight: bold;
}

.event-log-entry {
    transition: transform 0.2s ease;
}

.event-log-entry:hover {
    transform: translateX(3px);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.highlight {
    color: #daa520;
    font-weight: bold;
} 

/* Add a little bounce to important buttons */
#evening-btn, #tell-story-btn, #rest-btn, .tab-btn.active {
    animation: buttonBounce 0.7s cubic-bezier(.4,2,.6,1) 1;
}
@keyframes buttonBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.10); }
    60% { transform: scale(0.97); }
    100% { transform: scale(1); }
}

/* Subtle gold border for focus */
button:focus, .filter-btn:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* Misc polish */
.locations, .audience-section, .story-crafting, .story-preview, .gathered-info, .rumor-info, .events-info {
    background: #3a2a13;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px 0 rgba(44, 22, 0, 0.07);
    color: #fff;
    border: 1.5px solid #6b4a1b;
    font-size: 1.05em;
}

.card, .location-card, .info-card {
    background: #4a3728;
    border: 2px solid #3a2a13;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05em;
}

::-webkit-scrollbar {
    width: 10px;
    background: #3a2a13;
}
::-webkit-scrollbar-thumb {
    background: #6b4a1b;
    border-radius: 6px;
} 