/* ===============================
   ANGRY MEATBALLS - CSS STYLES
   =============================== */

/* Reset ve Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Trebuchet MS', cursive;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    color: #2c3e50;
    overflow-x: auto;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    padding: 20px;
    max-width: 1280px;
    width: 100%;
    position: relative;
}

/* Header Styles */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 15px;
    color: white;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-image {
    display: flex;
    gap: 5px;
}

.meatball {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #d35400, #e67e22, #8b4513);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 
        0 3px 6px rgba(0,0,0,0.3),
        inset 0 1px 3px rgba(255,255,255,0.3);
    animation: angryBounce 2s infinite;
    position: relative;
}

.meatball:nth-child(2) {
    animation-delay: -0.5s;
    transform: scale(1.2);
}

.meatball:nth-child(3) {
    animation-delay: -1s;
}

@keyframes angryBounce {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    25% { 
        transform: translateY(-5px) rotate(-5deg); 
    }
    75% { 
        transform: translateY(-3px) rotate(5deg); 
    }
}

.logo h1 {
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin: 0;
    letter-spacing: 2px;
}

.logo p {
    font-size: 1.2em;
    opacity: 0.9;
    font-style: italic;
}

.game-stats {
    display: flex;
    gap: 20px;
}

.stat {
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: bold;
    backdrop-filter: blur(10px);
}

.stat-icon {
    font-size: 1.3em;
}

/* Canvas Container */
.canvas-container {
    position: relative;
    background: linear-gradient(135deg, #87CEEB 0%, #98D8E8 50%, #B0E0E6 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
    border-radius: 15px;
}

/* Game UI Overlay */
.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.power-meter, .angle-meter {
    background: rgba(255,255,255,0.9);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    min-width: 120px;
}

.meter-label {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #2c3e50;
}

.meter-bar {
    width: 100px;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #f39c12, #e74c3c);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
}

.meter-value {
    font-size: 0.9em;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
}

.trajectory-info {
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.control-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    font-family: inherit;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn.hidden {
    display: none;
}

/* Instructions */
.instructions {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.instructions h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.instruction-icon {
    font-size: 1.5em;
    min-width: 30px;
}

/* Level Info */
.level-info {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
}

.level-info h4 {
    margin-bottom: 8px;
    font-size: 1.2em;
}

.level-info p {
    opacity: 0.9;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2em;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.star {
    font-size: 2em;
    animation: starBounce 0.5s ease;
}

.star:nth-child(2) {
    animation-delay: 0.1s;
}

.star:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes starBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.modal-stats {
    margin-bottom: 25px;
}

.modal-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.modal-btn.retry {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.modal-btn.continue {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.modal-btn.menu {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    color: white;
    animation: gradientShift 3s ease-in-out infinite;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 20px;
}

.loading-logo {
    margin-bottom: 20px;
}

.game-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    animation: logoFloat 2s ease-in-out infinite;
    object-fit: cover;
}

.loading-meatball {
    font-size: 4em;
    margin-bottom: 20px;
    animation: logoFloat 2s ease-in-out infinite;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1); }
    50% { background: linear-gradient(135deg, #4ecdc4, #45b7d1, #ff6b6b); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes loadingBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.loading-content h2 {
    font-size: 2.5em;
    margin: 20px 0 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    animation: textGlow 2s ease-in-out infinite;
    color: #fff;
}

.loading-subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.loading-tip {
    font-size: 1em;
    margin-top: 20px;
    opacity: 0.8;
    font-style: italic;
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
    50% { text-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.5); }
}

.loading-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.8;
}

.loading-bar {
    width: 300px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 3px;
    width: 0%;
    animation: loadingProgress 3s ease infinite;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2em;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .game-container {
        padding: 10px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8em;
    }
    
    .game-stats {
        flex-direction: row;
        justify-content: center;
    }
    
    .instruction-grid {
        grid-template-columns: 1fr;
    }
    
    .game-controls {
        flex-wrap: wrap;
    }
    
    .control-btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5em;
    }
    
    .meatball {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .game-ui {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        background: rgba(255,255,255,0.9);
        padding: 10px;
        border-radius: 10px;
        margin-bottom: 10px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

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

.pulse {
    animation: pulse 1s infinite;
}

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

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
