/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f4c75 0%, #3282b8 50%, #bbe1fa 100%);
    color: #1b262c;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
}

header {
    background: linear-gradient(90deg, #0f4c75, #3282b8);
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid #0b3c5d;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    justify-content: space-around;
    font-size: 1.2rem;
    font-weight: bold;
}

main {
    padding: 30px;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.screen.active {
    display: flex;
}

.tutorial-content {
    margin: 20px 0;
    text-align: left;
    width: 100%;
}

.tutorial-step {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.tutorial-step h3 {
    color: #0f4c75;
    margin-bottom: 10px;
}

.tutorial-step ul {
    padding-left: 20px;
}

.tutorial-step li {
    margin-bottom: 5px;
}

.tutorial-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.example-tower {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
}

.rod-example {
    width: 10px;
    height: 120px;
    background-color: #8d8d8d;
    border-radius: 5px;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    padding-bottom: 10px;
}

.rod-example.empty::after {
    content: "";
    display: block;
    width: 80px;
    height: 10px;
    background-color: #5a5a5a;
    border-radius: 5px;
    position: absolute;
    bottom: -5px;
    left: -35px;
}

.disk-example {
    height: 20px;
    border-radius: 10px;
    margin-bottom: 5px;
}

.disk-example.small {
    width: 60px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
}

.disk-example.medium {
    width: 80px;
    background: linear-gradient(90deg, #4ecdc4, #88d8d0);
}

.disk-example.large {
    width: 100px;
    background: linear-gradient(90deg, #45b7d1, #7ed0e8);
}

.example-caption {
    font-style: italic;
    color: #666;
    margin-top: 10px;
}

.tutorial-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.game-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: bold;
}

.control-group select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #0f4c75;
    background-color: white;
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.towers-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.tower {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 140px;
    position: relative;
}

.rod {
    width: 10px;
    height: 200px;
    background: linear-gradient(to bottom, #8d8d8d, #5a5a5a);
    border-radius: 5px;
    position: relative;
}

.rod::after {
    content: "";
    display: block;
    width: 120px;
    height: 10px;
    background-color: #5a5a5a;
    border-radius: 5px;
    position: absolute;
    bottom: -5px;
    left: -55px;
}

.disks {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    height: 195px;
}

.disk {
    height: 25px;
    border-radius: 12px;
    margin-bottom: 3px;
    cursor: grab;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.disk:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
}

.disk.dragging {
    opacity: 0.8;
    transform: scale(1.05);
    z-index: 10;
}

.tower-label {
    margin-top: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #0f4c75;
}

.button-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

.control-instruction {
    font-style: italic;
    color: #666;
}

.button-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.tower-btn {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    background: linear-gradient(90deg, #3282b8, #0f4c75);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tower-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tower-btn.selected {
    background: linear-gradient(90deg, #45b7d1, #0f4c75);
    box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.3);
}

.selected-info {
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    width: 100%;
}

.hint-display {
    min-height: 40px;
    padding: 10px;
    font-style: italic;
    color: #666;
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

.game-status {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #f0f0f0;
}

.final-result {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.efficiency-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.star {
    font-size: 1.5rem;
    color: #ffc107;
}

.game-over-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(90deg, #0f4c75, #3282b8);
    color: white;
    box-shadow: 0 4px 15px rgba(15, 76, 117, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 76, 117, 0.4);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #0f4c75;
    border: 2px solid #0f4c75;
}

.btn-secondary:hover {
    background-color: #e6e6ff;
}

footer {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .towers-container {
        gap: 30px;
    }
    
    .tower {
        width: 100px;
    }
    
    .rod {
        height: 150px;
    }
    
    .disks {
        height: 145px;
    }
    
    .disk {
        height: 20px;
        font-size: 0.8rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .tutorial-buttons, .game-over-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        margin-bottom: 10px;
    }
}