/**
 * Masked Truth Game - Main Game Styles
 */

/* Game Container */
.mtg-game-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header */
.mtg-game-header {
    text-align: center;
    margin-bottom: 30px;
}

.mtg-game-header h1 {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.mtg-tagline {
    font-size: 1.1em;
    color: #7f8c8d;
    font-style: italic;
}

/* Meters */
.mtg-meters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.mtg-truth-meter,
.mtg-chaos-meter {
    flex: 1;
}

.mtg-truth-meter label,
.mtg-chaos-meter label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mtg-truth-meter label {
    color: #27ae60;
}

.mtg-chaos-meter label {
    color: #e74c3c;
}

.meter-bar {
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 15px;
    position: relative;
}

.mtg-truth-meter .meter-fill {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.mtg-chaos-meter .meter-fill {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.meter-value {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: white;
    font-weight: 600;
    font-size: 0.85em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Event Display */
.mtg-event-display {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #3498db;
}

.mtg-event-title {
    font-size: 1.6em;
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.mtg-event-base {
    font-size: 1.05em;
    line-height: 1.6;
    color: #34495e;
}

/* Bubbles Container */
.mtg-bubbles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    min-height: 200px;
}

/* Bubble Styles */
.mtg-bubble {
    padding: 20px;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.mtg-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mtg-bubble.selected {
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
}

/* Bubble Types */
.mtg-bubble-neutral {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    color: white;
}

.mtg-bubble-emotional {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.mtg-bubble-authoritative {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

.mtg-bubble-viral {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.mtg-bubble-speculative {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.mtg-bubble-scam {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    border: 3px dashed #c0392b;
}

/* Bubble States */
.mtg-bubble-cracked {
    opacity: 0.7;
    position: relative;
}

.mtg-bubble-cracked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 48%, rgba(0,0,0,0.3) 48%, rgba(0,0,0,0.3) 52%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(0,0,0,0.3) 48%, rgba(0,0,0,0.3) 52%, transparent 52%);
    border-radius: 50%;
}

.mtg-bubble-burst {
    opacity: 0;
    transform: scale(1.3);
}

/* Animations */
@keyframes crack {
    0% { transform: scale(1); }
    50% { transform: scale(1.1) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes burst {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.crack-animation {
    animation: crack 0.6s ease;
}

.burst-animation {
    animation: burst 0.6s ease forwards;
}

/* Bubble Detail */
.mtg-bubble-detail {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.mtg-bubble-content {
    font-size: 1.1em;
    line-height: 1.7;
    color: #2c3e50;
    margin-bottom: 20px;
    min-height: 100px;
}

.mtg-bubble-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mtg-bubble-actions button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mtg-btn-question {
    background: #3498db;
    color: white;
}

.mtg-btn-question:hover {
    background: #2980b9;
}

.mtg-btn-share {
    background: #e74c3c;
    color: white;
}

.mtg-btn-share:hover {
    background: #c0392b;
}

.mtg-btn-ignore {
    background: #95a5a6;
    color: white;
}

.mtg-btn-ignore:hover {
    background: #7f8c8d;
}

/* Red Flags Panel */
.mtg-red-flags-panel {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: none;
}

.mtg-red-flags-panel h3 {
    margin-top: 0;
    color: #856404;
}

.mtg-red-flags-panel ul {
    margin: 15px 0;
    padding-left: 20px;
}

.mtg-red-flags-panel li {
    margin: 8px 0;
    color: #856404;
}

/* End Screen */
.mtg-end-screen {
    text-align: center;
    padding: 40px;
}

.mtg-end-screen h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.mtg-end-truth h2 {
    color: #27ae60;
}

.mtg-end-chaos h2 {
    color: #e74c3c;
}

.mtg-final-stats {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    display: inline-block;
}

.mtg-final-stats p {
    margin: 10px 0;
    font-size: 1.1em;
}

.mtg-btn-replay {
    padding: 15px 40px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mtg-btn-replay:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Toast Messages */
.mtg-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #2c3e50;
    color: white;
    padding: 15px 25px;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

.mtg-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .mtg-game-container {
        padding: 20px;
        margin: 20px;
    }
    
    .mtg-bubbles-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .mtg-bubble {
        width: 120px;
        height: 120px;
        font-size: 0.85em;
        padding: 15px;
    }
    
    .mtg-bubble-actions {
        flex-direction: column;
    }
    
    .mtg-bubble-actions button {
        width: 100%;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .mtg-bubble {
        border-width: 4px;
    }
    
    .meter-bar {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .mtg-bubble,
    .meter-fill,
    .mtg-toast {
        transition: none;
    }
    
    .crack-animation,
    .burst-animation {
        animation: none;
    }
}
