/* Common Styles - Shared across all games */

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

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
}

/* Common Buttons */
.btn {
    width: 100%;
    padding: 14px;
    background: #1e3c72;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

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

.btn-secondary {
    background: #666;
}

.btn-secondary:hover {
    background: #555;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-play {
    background: #4CAF50;
    flex: 1;
}

.btn-play:hover {
    background: #45a049;
}

.btn-play:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-pickup {
    background: #ff9800;
    flex: 1;
}

.btn-pickup:hover {
    background: #f57c00;
}

.btn-start {
    background: #4CAF50;
}

.btn-start:hover {
    background: #45a049;
}

.btn-leave {
    background: #f44336;
}

.btn-leave:hover {
    background: #d32f2f;
}

.btn-new-game {
    background: #2196F3;
    width: 100%;
    margin-top: 20px;
    font-size: 18px;
    padding: 15px;
}

.btn-new-game:hover {
    background: #0b7dda;
}

.btn-rules {
    padding: 10px 16px;
    background: #ff9800;
    white-space: nowrap;
}

.btn-rules:hover {
    background: #f57c00;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 16px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #1e3c72;
}

/* Divider */
.divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ddd;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* Language Buttons */
.lang-btn {
    padding: 10px 12px;
    background: #f0f0f0;
    color: #333;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: #e0e0e0;
}

.lang-btn.active {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #1e3c72;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: #f0f0f0;
}

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

/* Win Badge */
.win-badge {
    background: #FFD700;
    color: #1e3c72;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-200px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    max-width: 80%;
    text-align: center;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(-50%) translateY(-200px);
    opacity: 0;
}
