/* ============================================================
   User Profile & Login
   ============================================================ */
.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.login-section {
    margin-bottom: 30px;
}

/* ============================================================
   Goals Modal
   ============================================================ */

/* ============================================================
   Goals Modal & Tabs
   ============================================================ */
.goals-content,
.settings-content {
    max-width: 600px;
    width: 90%;
}

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

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

.tab-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-weight: bold;
    color: #888;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.wallet-display {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 10px;
    color: #856404;
}

.date-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 10px 0 20px 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

.date-selector button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

.goals-list,
.settings-list {
    display: grid;
    gap: 15px;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.goal-item,
.setting-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    transition: background 0.2s;
}

.goal-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.goal-item:hover {
    background: #f0f0f0;
}

.goal-checkbox {
    width: 25px;
    height: 25px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.goal-label {
    font-size: 1.1rem;
    font-weight: bold;
}

.goal-reward {
    font-size: 0.9rem;
    color: #28a745;
    font-weight: bold;
    background: #d4edda;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Settings Specific */
.add-task-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.add-task-form input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

#new-task-name {
    flex: 2;
}

#new-task-reward {
    flex: 1;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.delete-btn {
    color: #dc3545;
    background: none;
    border: 1px solid #dc3545;
    padding: 4px 8px;
    border-radius: 5px;
    cursor: pointer;
}

/* Anniversary Modal */
.anniversary-content {
    max-width: 440px;
    padding: 30px 28px;
}

.ann-desc {
    color: #888;
    font-size: 0.85rem;
    margin: -5px 0 18px;
}

.anniversary-list {
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    text-align: left;
}

.anniversary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fff5f5, #fef3f0);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #fde2e2;
}

.anniversary-item .ann-date {
    font-weight: bold;
    color: #e06070;
    background: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid #fde2e2;
}

.anniversary-item .ann-name {
    flex: 1;
    font-size: 0.95rem;
}

.add-anniversary-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.ann-input-row {
    display: flex;
    gap: 8px;
}

.ann-date-input {
    width: 90px;
    min-width: 90px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
}

.ann-name-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.9rem;
}

.ann-add-btn {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.95rem;
}

/* Omok Game */
.omok-board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.omok-board {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
    background-color: #dcb35c;
    border: 3px solid #000;
    width: min(88vh, 90vw, 900px);
    height: min(88vh, 90vw, 900px);
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.omok-cell {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Grid Lines - Horizontal */
.omok-cell::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #000;
    z-index: 0;
    transform: translateY(-50%);
}

/* Grid Lines - Vertical */
.omok-cell::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    width: 2px;
    background: #000;
    z-index: 0;
    transform: translateX(-50%);
}

.omok-cell.first-col::before {
    left: 50%;
    width: 50%;
}

.omok-cell.last-col::before {
    width: 50%;
}

.omok-cell.first-row::after {
    top: 50%;
    height: 50%;
}

.omok-cell.last-row::after {
    height: 50%;
}

/* Pieces */
.omok-piece {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.omok-b {
    background: radial-gradient(circle at 30% 30%, #444, #000);
}

.omok-w {
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
}

.omok-last-move::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 40%;
    background-color: rgba(255, 0, 0, 0.7);
    border-radius: 50%;
    z-index: 11;
}

/* Level Grid */
.level-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
    max-width: 500px;
}

.level-btn {
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.level-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.l-easy {
    color: #28a745;
    border: 2px solid #e8f5e9;
}

.l-mid {
    color: #ffc107;
    border: 2px solid #fff8e1;
}

.l-hard {
    color: #dc3545;
    border: 2px solid #ffebee;
}

/* Omok Status Highlight */
#omok-status.highlight {
    font-size: 2.5rem;
    color: #ff4081;
    text-shadow: 0 0 10px rgba(255, 64, 129, 0.5);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Shared Game Result Modal */
.game-result-text {
    font-size: 1.4rem;
    color: #555;
    margin: 10px 0 0;
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.6);
    width: 100%;
}

.game-header h2 {
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.game-header .controls {
    display: flex;
    gap: 10px;
}

/* Family Edit */
.family-edit-modal {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.round-edit-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 12px;
}

.edit-round-header {
    margin-bottom: 10px;
}

.edit-round-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.edit-round-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-round-fields label {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

.edit-round-fields input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
}