/* Modal Styles - Dialog boxes and overlay windows */

/* Modal styles for savings bank and other overlays */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #f8f9fa;
    margin: 10% auto;
    padding: 2rem;
    border: 3px solid #333;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
}

.modal-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

.savings-input {
    margin: 1.5rem 0;
    text-align: center;
}

.savings-input input {
    width: 120px;
    padding: 0.5rem;
    border: 2px solid #333;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
    margin-right: 0.5rem;
}

.savings-input button {
    background: #28a745;
    color: white;
    border: 2px solid #1e7e34;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}

.savings-input button:hover {
    background: #218838;
}

.amount-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.amount-controls .qty-btn {
    background: #6c757d;
    color: white;
    border: 2px solid #5a6268;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 50px;
}

.amount-controls .qty-btn:hover {
    background: #545b62;
}

.amount-controls input {
    margin: 0;
    flex: 1;
    max-width: 120px;
}

.bank-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 4px;
    border: 2px solid #ddd;
    margin: 1rem 0;
}

/* Game Over Styles */
.final-results {
    background: linear-gradient(135deg, #FFE082 0%, #FFD54F 100%);
    border: 4px solid #FFA000;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.3);
}

.final-results h2 {
    color: #E65100;
    margin: 0 0 2rem 0;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.final-stat {
    background: white;
    border: 3px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.final-stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.final-stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.final-stat-label {
    font-size: 1rem;
    color: #666;
    margin: 0.25rem 0 0 0;
}

.achievements-section {
    background: linear-gradient(135deg, #E8F5E8 0%, #C8E6C9 100%);
    border: 3px solid #4CAF50;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.achievements-section h3 {
    color: #2E7D32;
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.achievement-item {
    background: white;
    border: 2px solid #4CAF50;
    border-radius: 4px;
    padding: 1rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.achievement-icon {
    font-size: 1.5rem;
}

.achievement-text {
    font-weight: bold;
    color: #333;
}

.restart-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45A049 100%);
    color: white;
    border: 3px solid #388E3C;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    margin-top: 2rem;
}

.restart-btn:hover {
    background: linear-gradient(135deg, #45A049 0%, #388E3C 100%);
    transform: translateY(-2px);
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3);
}
