/* Modal and header button styles */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
    transition: transform 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    transform: scale(1.1);
}

.icon-btn:active {
    transform: scale(0.95);
}

/* Modal */
.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(4px);
    animation: fadeIn 0.2s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Settings */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.setting-item label {
    font-weight: 600;
}

.setting-item input[type="checkbox"] {
    width: 40px;
    height: 20px;
    appearance: none;
    background: #ddd;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.setting-item input[type="checkbox"]:checked {
    background: var(--primary-color);
}

.setting-item input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
}

.setting-item input[type="checkbox"]:checked::before {
    left: 22px;
}

.language-select {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 2px solid #eee;
    font-family: var(--font-main);
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.about {
    margin-top: 1rem;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 1.5rem 0;
}

/* Game menu in settings */
.game-menu-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seed-info-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: #f5f5f5;
    border-radius: 10px;
    font-family: monospace;
    font-size: 0.9rem;
}

.seed-info-modal label {
    font-weight: 600;
    color: #666;
}

.seed-input-group-modal {
    display: flex;
    gap: 0.5rem;
}

.seed-input-modal {
    flex: 1;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 2px solid #eee;
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.seed-input-modal:focus {
    outline: none;
    border-color: var(--primary-color);
}

.full-width {
    width: 100%;
}

/* Setting groups */
.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

.setting-group input[type="checkbox"] {
    width: 40px;
    height: 20px;
    appearance: none;
    background: #ddd;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.setting-group input[type="checkbox"]:checked {
    background: var(--primary-color);
}

.setting-group input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
}

.setting-group input[type="checkbox"]:checked::before {
    left: 22px;
}

/* Solution list */
.solution-list {
    max-height: 60vh;
    overflow-y: auto;
}

.solution-section {
    margin-bottom: 1.5rem;
}

.solution-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.solution-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.solution-word {
    padding: 0.4rem 0.8rem;
    background: white;
    border: 1px solid #eee;
    border-radius: 15px;
    font-size: 0.9rem;
    text-transform: capitalize;
}

.solution-word.found {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    font-weight: 600;
}

.solution-word.pangram {
    background: #fff3cd;
    border-color: var(--primary-color);
    font-weight: 600;
}

.solution-word.pangram.found {
    background: #b8dab8;
    border-color: #28a745;
}