/**
 * VixViu Scenario Frontend CSS
 * Foundation CSS overrides for frontend styling
 * 
 * IMPORTANT: This file loads AFTER foundation CSS to ensure overrides work properly
 * Use !important sparingly and only when necessary for foundation CSS overrides
 */

/* Plugin-specific wrapper styling */
.vixviu-scenario-wrapper {
    /* Add any plugin-specific wrapper styles here */
}

/* Body styling for popup preview */
body.vixviu-scenario-preview {
    margin: 0;
    padding: 20px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Mobile Game Interface */
.vixviu-scenario-mobile-game-container {
    width: 1080px;
    height: 1920px;
    background: #7b7b7b;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

    /* Four Quadrants */
.vixviu-scenario-quadrant {
    position: absolute;
    width: 50%;
    height: 50%;
    border: 3px solid;
}

.vixviu-scenario-quadrant-top-left {
    top: 0;
    left: 0;
    border-color: #ff0000;
}

.vixviu-scenario-quadrant-top-right {
    top: 0;
    right: 0;
    border-color: #00ff00;
}

.vixviu-scenario-quadrant-bottom-left {
    bottom: 0;
    left: 0;
    border-color: #0000ff;
}

.vixviu-scenario-quadrant-bottom-right {
    bottom: 0;
    right: 0;
    border-color: #ffff00;
}

/* Game Header */
.vixviu-scenario-game-header {
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 100;
}

.vixviu-scenario-game-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.vixviu-scenario-game-progress {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Game Screen */
.vixviu-scenario-game-screen {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #000;
}

.vixviu-scenario-scenes-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.vixviu-scenario-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vixviu-scenario-scene.active {
    display: block;
    opacity: 1;
}

/* Scene Background */
.vixviu-scenario-scene-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.vixviu-scenario-scene-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vixviu-scenario-default-bg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Scene Content */
.vixviu-scenario-scene-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    color: #fff;
}

.vixviu-scenario-scene-header {
    margin-bottom: 20px;
}

.vixviu-scenario-scene-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    text-align: center;
}

.vixviu-scenario-scene-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.vixviu-scenario-scene-description {
    font-size: 1.1rem;
    margin: 0 0 20px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    max-width: 300px;
    line-height: 1.4;
}

/* Scene Type Indicator */
.vixviu-scenario-scene-type-indicator {
    margin-bottom: 20px;
}

.vixviu-scenario-type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vixviu-scenario-type-badge.interstitial {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.5);
}

.vixviu-scenario-type-badge.gameplay {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.5);
}

/* Interaction Area */
.vixviu-scenario-interaction-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* Success/Failure Messages */
.vixviu-scenario-messages {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
}

.vixviu-scenario-success-message,
.vixviu-scenario-failure-message {
    background: rgba(0,0,0,0.9);
    color: #fff;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: messageSlideIn 0.3s ease;
}

.vixviu-scenario-success-message {
    border: 2px solid #00ff00;
}

.vixviu-scenario-failure-message {
    border: 2px solid #ff0000;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Fireball Says Game Mechanics */
.vixviu-scenario-fireball-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    z-index: 10;
}

.vixviu-scenario-quadrant-flash {
    background: rgba(255, 255, 0, 0.8) !important;
    border-color: rgba(255, 255, 0, 1) !important;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.6);
}

.vixviu-scenario-quadrant-tap {
    background: rgba(0, 255, 0, 0.6) !important;
    border-color: rgba(0, 255, 0, 1) !important;
    transform: scale(0.95);
}

.vixviu-scenario-player-turn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-align: center;
    z-index: 20;
}

.vixviu-scenario-player-turn p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Time-Based Game Mechanics */
.vixviu-scenario-timer-display {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 15;
    text-align: center;
}

.vixviu-scenario-timer-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.vixviu-scenario-timer-text {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.vixviu-scenario-timer-label {
    color: #fff;
    font-size: 0.9rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Fullscreen Click Game Mechanics */
.vixviu-scenario-tap-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 15;
}

.vixviu-scenario-tap-indicator {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

.vixviu-scenario-tap-prompt p {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Hitmap Game Mechanics */
.vixviu-scenario-hitmap-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    z-index: 15;
}

.vixviu-scenario-hitmap-placeholder p {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

/* Game Feedback */
.vixviu-scenario-game-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    z-index: 25;
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 200px;
}

.vixviu-scenario-game-feedback.success {
    background: rgba(0, 255, 0, 0.9);
    color: #000;
    border: 2px solid #00ff00;
}

.vixviu-scenario-game-feedback.error {
    background: rgba(255, 0, 0, 0.9);
    color: #fff;
    border: 2px solid #ff0000;
}

.vixviu-scenario-game-feedback p {
    margin: 0;
}

/* Loading Game Indicator */
.vixviu-scenario-loading-game {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 5;
}

.vixviu-scenario-loading-game p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Game Complete Screen */
.vixviu-scenario-game-complete {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.vixviu-scenario-complete-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.vixviu-scenario-complete-content h2 {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.vixviu-scenario-complete-content p {
    font-size: 1.2rem;
    margin: 0 0 2rem 0;
    opacity: 0.9;
}

.vixviu-scenario-restart-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.vixviu-scenario-restart-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}