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

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #262626;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #333333;
    --primary-red: #dc2626;
    --success: #16a34a;
    --warning: #eab308;
    --info: #3b82f6;
}

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

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

/* Splash screen styles removed (not used) */

.game-container {
    max-width: 900px;
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.game-header {
    background: linear-gradient(135deg, var(--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);
}

.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: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.back-button:hover {
    background: rgba(255,255,255,0.3);
}

.game-content {
    padding: 2rem;
    text-align: center;
}

.game-canvas {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: #000;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.game-controls {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

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

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

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0.5rem;
}

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

.btn-primary:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

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

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

.game-message {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
}

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

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

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

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

.lives-display {
    color: var(--primary-red);
    font-weight: 600;
}

.score-display {
    color: var(--success);
    font-weight: 600;
}

@media (max-width: 768px) {
    .game-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }
    
    .game-content {
        padding: 1rem;
    }
    
    .game-info {
        flex-direction: column;
        text-align: center;
    }
    
    .back-button {
        position: static;
        transform: none;
        margin-bottom: 1rem;
    }
    
    .game-title {
        font-size: 2rem;
    }
}

.hidden {
    display: none;
}

/* Share Buttons and Modal 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: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
    min-width: 120px;
    justify-content: center;
}

.share-btn:hover {
    transform: translateY(-2px);
    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: #DC2626; }

/* Modal Styles */
.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: #1a1a1a;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    color: white;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #DC2626;
}

.close-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: white;
}

.embed-code-container {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    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: #DC2626;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
}

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

.embed-preview {
    margin-top: 20px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
}

.embed-preview h4 {
    color: #DC2626;
    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: #ccc;
}

.dimension-input input {
    padding: 8px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #0a0a0a;
    color: white;
    width: 100px;
}