/* Game Pages Shared Styles - Durgul by Hunter Interactive */
/* This file contains reusable styles for all game pages */

/* Import main styles and fonts */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap');

/* Game-specific CSS Variables */
:root {
    /* Game UI Colors */
    --game-bg-primary: #0f0f0f;
    --game-bg-secondary: #1a1a1a;
    --game-bg-tertiary: #262626;
    --game-text-primary: #ffffff;
    --game-text-secondary: #cccccc;
    --game-text-muted: #888888;
    --game-border-color: #333333;
    --game-primary-red: #dc2626;
    --game-success: #16a34a;
    --game-warning: #eab308;
    --game-info: #3b82f6;
    
    /* Game Layout */
    --game-container-max-width: 900px;
    --game-canvas-border: 2px solid var(--game-border-color);
    --game-border-radius: 8px;
    --game-border-radius-large: 12px;
    
    /* Game Animations */
    --game-transition: all 0.2s ease;
    --game-hover-transform: translateY(-2px);
}

/* Reset for game pages */
.game-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.game-page body {
    font-family: 'Jost', sans-serif;
    background: var(--game-bg-primary);
    color: var(--game-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem;
}

/* Game Container - Main wrapper for all game content */
.game-container {
    max-width: var(--game-container-max-width);
    width: 100%;
    background: var(--game-bg-secondary);
    border-radius: var(--game-border-radius-large);
    border: 1px solid var(--game-border-color);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
}

/* Game Header - Title and navigation */
.game-header {
    background: linear-gradient(135deg, var(--game-primary-red), #b91c1c);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.back-button {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--game-border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--game-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-50%) var(--game-hover-transform);
}

/* Game Content Area */
.game-content {
    padding: 2rem;
    text-align: center;
}

/* Game Canvas Styles */
.game-canvas {
    border: var(--game-canvas-border);
    border-radius: var(--game-border-radius);
    background: #000;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
    cursor: none;
}

/* Game Info Panel - Score, level, lives display */
.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--game-bg-tertiary);
    border-radius: var(--game-border-radius);
    flex-wrap: wrap;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.score-display { color: var(--game-success); font-weight: 600; }
.lives-display { color: var(--game-primary-red); font-weight: 600; }
.level-display {
    background: linear-gradient(135deg, var(--game-info), #2563eb);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Game Controls Panel */
.game-controls {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--game-bg-tertiary);
    border-radius: var(--game-border-radius);
}

.controls-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--game-primary-red);
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--game-bg-secondary);
    border-radius: 6px;
}

.control-info {
    font-size: 1rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--game-border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--game-transition);
    margin: 0.5rem;
    font-family: 'Jost', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--game-primary-red);
    color: white;
}

.btn-primary:hover {
    background: #b91c1c;
    transform: var(--game-hover-transform);
}

.btn-secondary {
    background: var(--game-bg-tertiary);
    color: var(--game-text-primary);
    border: 1px solid var(--game-border-color);
}

.btn-secondary:hover {
    background: var(--game-border-color);
}

.game-btn {
    background: transparent;
    color: var(--game-text-primary);
    border: 2px solid var(--game-text-primary);
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--game-transition);
    font-family: 'Jost', sans-serif;
}

.game-btn:hover {
    background: var(--game-text-primary);
    color: var(--game-bg-primary);
}

.game-btn:active {
    transform: scale(0.95);
}

/* Game Button Container */
.game-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Game Messages */
.game-message {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: var(--game-border-radius);
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
}

.message-success {
    background: rgba(22, 163, 74, 0.2);
    color: var(--game-success);
    border: 1px solid var(--game-success);
}

.message-warning {
    background: rgba(234, 179, 8, 0.2);
    color: var(--game-warning);
    border: 1px solid var(--game-warning);
}

.message-info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--game-info);
    border: 1px solid var(--game-info);
}

/* Game Status Overlay */
.game-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 30px 50px;
    border: 2px solid var(--game-text-primary);
    border-radius: var(--game-border-radius);
    display: none;
    z-index: 1000;
}

.game-over-score {
    font-size: 1.2rem;
    margin-top: 15px;
    opacity: 0.9;
}

/* Score Board Styles */
.score-board {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    font-weight: 600;
}

.current-score, .high-score, .player-score, .computer-score {
    text-align: center;
    min-width: 120px;
}

.score-label {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
}

/* Share Section Styles */
.share-section {
    margin-top: 30px;
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--game-border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--game-transition);
    color: white;
    min-width: 120px;
    justify-content: center;
}

.share-btn:hover {
    transform: var(--game-hover-transform);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.embed { background: var(--game-primary-red); }

/* Modal Styles for Embed Code */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: var(--game-bg-secondary);
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--game-border-radius-large);
    width: 90%;
    max-width: 800px;
    color: var(--game-text-primary);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--game-border-color);
    padding-bottom: 15px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--game-primary-red);
}

.close-btn {
    background: none;
    border: none;
    color: var(--game-text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: var(--game-transition);
}

.close-btn:hover {
    color: var(--game-text-primary);
}

.embed-code-container {
    background: var(--game-bg-primary);
    border: 1px solid var(--game-border-color);
    border-radius: var(--game-border-radius);
    padding: 20px;
    margin: 15px 0;
}

.embed-code {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    width: 100%;
    min-height: 150px;
    resize: vertical;
    outline: none;
}

.copy-btn {
    background: var(--game-primary-red);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    transition: var(--game-transition);
}

.copy-btn:hover {
    background: #b91c1c;
}

.embed-preview {
    margin-top: 20px;
    padding: 15px;
    background: var(--game-bg-tertiary);
    border-radius: var(--game-border-radius);
}

.embed-preview h4 {
    color: var(--game-primary-red);
    margin-bottom: 10px;
}

.embed-dimensions {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.dimension-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dimension-input label {
    font-size: 12px;
    color: var(--game-text-secondary);
}

.dimension-input input {
    padding: 8px;
    border: 1px solid var(--game-border-color);
    border-radius: 4px;
    background: var(--game-bg-primary);
    color: var(--game-text-primary);
    width: 100px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        margin: 0.5rem;
        border-radius: var(--game-border-radius);
    }
    
    .game-content {
        padding: 1rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .back-button {
        position: static;
        transform: none;
        margin-bottom: 1rem;
        align-self: flex-start;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .score-board {
        font-size: 2rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .game-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .modal-content {
        margin: 2% auto;
        padding: 20px;
        width: 95%;
    }
    
    .embed-dimensions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.5rem;
    }
    
    .score-board {
        font-size: 1.5rem;
    }
    
    .game-status {
        font-size: 1.5rem;
        padding: 20px 30px;
    }
}