/**
 * KrazzOut Stylesheet
 * Main styling for the game interface
 */

.krazzout-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.krazzout-header {
    text-align: center;
    margin-bottom: 20px;
}

.krazzout-header h2 {
    color: #ffffff;
    font-size: 2.5em;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    margin: 0;
}

/* Main Menu */
.krazzout-menu {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
}

.menu-container {
    max-width: 400px;
    margin: 0 auto;
}

.game-logo {
    margin-bottom: 40px;
}

.krazzout-title {
    font-size: 4em;
    color: #ffeb3b;
    text-shadow: 0 0 20px rgba(255, 235, 59, 0.5),
                 0 5px 10px rgba(0, 0, 0, 0.8);
    margin: 0;
    font-weight: bold;
    letter-spacing: 3px;
}

.game-subtitle {
    color: #ffffff;
    font-size: 1.1em;
    margin-top: 10px;
    opacity: 0.9;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-buttons .btn {
    font-size: 1.2em;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.menu-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.menu-buttons .btn i {
    margin-right: 10px;
}

.menu-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-toggle {
    color: #ffffff;
    font-size: 1.1em;
}

.settings-toggle label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.settings-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Game Screen */
.game-screen {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
}

.game-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: #ffffff;
}

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

.info-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 5px;
}

.info-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #ffeb3b;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

#game-canvas {
    display: block;
    margin: 0 auto;
    background: #000000;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    cursor: none;
}

/* Power-up Display */
.powerup-display {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.active-powerup {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    animation: pulse 1s infinite;
}

.active-powerup.expand { background: #00ff00; }
.active-powerup.shrink { background: #ff0000; }
.active-powerup.multiball { background: #ffff00; color: #000; }
.active-powerup.laser { background: #00ffff; color: #000; }
.active-powerup.slow { background: #0000ff; }
.active-powerup.fast { background: #ff00ff; }
.active-powerup.life { background: #ff1493; }
.active-powerup.pierce { background: #ffa500; }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Highscores Screen */
.highscores-screen {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 30px;
}

.highscores-container {
    max-width: 800px;
    margin: 0 auto;
}

.highscores-container h3 {
    color: #ffeb3b;
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 25px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.highscore-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #ffeb3b;
    color: #000000;
    border-color: #ffeb3b;
}

.highscores-table {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.highscores-table table {
    width: 100%;
    color: #ffffff;
}

.highscores-table thead th {
    background: rgba(255, 235, 59, 0.2);
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ffeb3b;
}

.highscores-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.highscores-table tbody td {
    padding: 10px 12px;
}

.highscores-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.no-scores {
    text-align: center;
    color: #ffffff;
    font-size: 1.5em;
    padding: 60px 20px;
    opacity: 0.7;
}

/* Instructions Screen */
.instructions-screen {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 30px;
}

.instructions-container {
    max-width: 700px;
    margin: 0 auto;
    color: #ffffff;
}

.instructions-container h3 {
    color: #ffeb3b;
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.instructions-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
}

.instruction-section {
    margin-bottom: 30px;
}

.instruction-section h4 {
    color: #ffeb3b;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.instruction-section ul {
    list-style: none;
    padding: 0;
}

.instruction-section li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.instruction-section li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #ffeb3b;
}

.powerup-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.powerup-item {
    padding: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.powerup-item.expand { background: rgba(0, 255, 0, 0.2); }
.powerup-item.shrink { background: rgba(255, 0, 0, 0.2); }
.powerup-item.multiball { background: rgba(255, 255, 0, 0.2); }
.powerup-item.laser { background: rgba(0, 255, 255, 0.2); }
.powerup-item.slow { background: rgba(0, 0, 255, 0.2); }
.powerup-item.fast { background: rgba(255, 0, 255, 0.2); }
.powerup-item.life { background: rgba(255, 20, 147, 0.2); }
.powerup-item.pierce { background: rgba(255, 165, 0, 0.2); }

.powerup-icon {
    font-size: 1.5em;
    font-weight: bold;
}

.brick-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.brick-type {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.brick-sample {
    width: 40px;
    height: 20px;
    border-radius: 3px;
    border: 2px solid #000;
}

.brick-sample.brick-1 { background: #4a90e2; }
.brick-sample.brick-2 { background: #50c878; }
.brick-sample.brick-3 { background: #ff6b6b; }
.brick-sample.brick-4 { background: #808080; }
.brick-sample.brick-5 { background: #ffd700; }
.brick-sample.brick-6 { background: #ff4500; }

/* Game Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h3 {
    color: #ffeb3b;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

#modal-body {
    color: #ffffff;
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.6;
}

#modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-btn {
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 850px) {
    #game-canvas {
        width: 100%;
        height: auto;
    }
    
    .krazzout-title {
        font-size: 3em;
    }
    
    .game-info {
        flex-wrap: wrap;
    }
    
    .info-item {
        flex: 1 1 40%;
        margin: 5px;
    }
}

@media (max-width: 600px) {
    .krazzout-container {
        padding: 10px;
    }
    
    .krazzout-menu {
        padding: 20px;
    }
    
    .krazzout-title {
        font-size: 2.5em;
    }
    
    .menu-buttons .btn {
        font-size: 1em;
        padding: 12px;
    }
    
    .highscores-container,
    .instructions-container {
        padding: 10px;
    }
    
    .brick-types,
    .powerup-list {
        grid-template-columns: 1fr;
    }
}

/* Admin Styles */
.admin-container {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.admin-tab {
    padding: 10px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-tab:hover {
    background: #e0e0e0;
}

.admin-tab.active {
    background: #2196f3;
    color: #ffffff;
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
}

.level-editor-grid {
    display: grid;
    grid-template-columns: repeat(12, 50px);
    gap: 2px;
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
    justify-content: center;
}

.level-editor-cell {
    width: 50px;
    height: 25px;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.level-editor-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.level-editor-cell.type-0 { background: #ffffff; }
.level-editor-cell.type-1 { background: #4a90e2; }
.level-editor-cell.type-2 { background: #50c878; }
.level-editor-cell.type-3 { background: #ff6b6b; }
.level-editor-cell.type-4 { background: #808080; }
.level-editor-cell.type-5 { background: #ffd700; }
.level-editor-cell.type-6 { background: #ff4500; }

.brick-selector {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.brick-select-btn {
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.brick-select-btn.active {
    border-color: #000000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.brick-select-btn.type-0 { background: #ffffff; border: 2px solid #ccc; }
.brick-select-btn.type-1 { background: #4a90e2; color: #fff; }
.brick-select-btn.type-2 { background: #50c878; color: #fff; }
.brick-select-btn.type-3 { background: #ff6b6b; color: #fff; }
.brick-select-btn.type-4 { background: #808080; color: #fff; }
.brick-select-btn.type-5 { background: #ffd700; }
.brick-select-btn.type-6 { background: #ff4500; color: #fff; }
