/* Main Game Styles - Extracted from complete prototype */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 20px;
    height: 100vh;
}

.game-header {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.game-title {
    font-size: 2.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #4a90e2, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.8em;
    color: #666;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.characters-panel, .activities-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.panel-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.character-section {
    margin-bottom: 25px;
}

.character-section h3 {
    color: #4a90e2;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
}

.character-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.character-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
    border-color: #4a90e2;
}

.character-card.selected {
    border-color: #4a90e2;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.25);
}

.character-card.player {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    cursor: default;
}

.character-card.romantic {
    border-left: 4px solid #e91e63;
}

.character-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.character-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.character-avatar.has-image {
    background: transparent;
    padding: 0;
}

.character-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.character-info h3 {
    margin: 0;
    font-size: 1em;
    color: #333;
    border: none;
    padding: 0;
}

.character-type {
    font-size: 0.8em;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}

.character-description {
    font-size: 0.85em;
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
}

.relationship-display {
    margin-top: 10px;
}

.relationship-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.relationship-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.relationship-status {
    font-size: 0.8em;
    color: #666;
    text-align: center;
}

.activity-tabs {
    display: flex;
    margin-bottom: 20px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
}

.tab-button {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.tab-button.active {
    background: white;
    color: #4a90e2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.activity-button {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.activity-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
    border-color: #4a90e2;
}

.activity-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

.activity-button.special {
    border-color: #e91e63;
    background: linear-gradient(135deg, #fce7f3, #f3e8ff);
}

.activity-button.conversation {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    position: relative;
}

.activity-button.conversation::before {
    content: "💬";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2em;
    opacity: 0.7;
}


.activity-button.social-amber {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.activity-button.social-amber:hover:not(:disabled) {
    border-color: #d97706;
    background: linear-gradient(135deg, #fde68a, #fcd34d);
}

/* Locked state overlay - works with all variants */
.activity-button:disabled {
    position: relative;
    opacity: 0.6;
    cursor: not-allowed;
}

.activity-button:disabled::after {
    content: "🔒";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2em;
    opacity: 0.7;
}

.activity-name {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 1em;
}

.activity-description {
    font-size: 0.85em;
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
}

.activity-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #666;
    font-weight: 500;
}

.event-log {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

.event-log h3 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.event-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
}

.event-message {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 0.9em;
    line-height: 1.4;
    border-left: 3px solid #ddd;
}

.event-message.success {
    background: #d1fae5;
    border-left-color: #10b981;
    color: #065f46;
}

.event-message.warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

.event-message.danger {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.event-message.romance {
    background: #fce7f3;
    border-left-color: #e91e63;
    color: #831843;
}

.event-message.conversation {
    background: #e0f2fe;
    border-left-color: #0891b2;
    color: #164e63;
}

.game-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Replace both .control-button rules in your main.css with this single rule */

.control-button {
    /* Layout properties */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    
    /* Spacing */
    padding: 12px 20px;
    margin-top: 10px;
    
    /* Visual styling */
    border: 2px solid transparent;
    border-radius: 12px;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    
    /* Typography */
    font-weight: bold;
    font-size: 1em;
    text-align: center;
    text-decoration: none;
    
    /* Interaction */
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    
    /* Positioning */
    position: relative;
    overflow: hidden;
}

/* More specific rule to override conflicting styles */
.game-controls .control-button,
.control-button.bug-report-button,
.control-button.sleep-button,
.control-button.secondary-button {
    min-height: 48px !important;
    height: auto !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.control-button:active {
    transform: translateY(0);
}

.control-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.sleep-button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.sleep-button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
}

.secondary-button {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.secondary-button:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
    }
    
    .characters-panel {
        grid-row: 2;
    }
    
    .activities-panel {
        grid-row: 3;
    }
    
    .event-log {
        grid-row: 4;
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .game-container {
        padding: 10px;
        gap: 15px;
    }
    
    .game-header {
        padding: 15px;
    }
    
    .game-title {
        font-size: 2em;
    }
    
    .stats-bar {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
}

/* Updated CSS for main.css - Add this to your existing main.css file */


/* Sleep Button Styling */
.sleep-button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #10b981;
}

.sleep-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.sleep-button:active {
    transform: translateY(0);
}

/* Sleep button urgent state (when tired) */
.sleep-button.urgent {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: #ef4444 !important;
    animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* Secondary Button Styling */
.secondary-button {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border-color: #6b7280;
}

.secondary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.secondary-button:active {
    transform: translateY(0);
}

/* Bug Report Button Styling */
/* Bug Report Button Styling */
.bug-report-button {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-color: #f59e0b;
}

.bug-report-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.bug-report-button:active {
    transform: translateY(0);
}

/* Disabled state for all control buttons */
.control-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.control-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Game Controls Container */
.game-controls {
    display: flex;
    flex-direction: column;
    gap: 0; /* Remove gap since buttons have their own margin-top */
    margin-top: 15px;
}

/* Ensure all buttons in game controls have consistent spacing */
.game-controls .control-button {
    margin-top: 10px;
}

.game-controls .control-button:first-child {
    margin-top: 0;
}