/* admin.css */

.admin-link {
    font-size: 10px;
    color: #999;
    cursor: pointer;
    margin-left: 5px;
    text-decoration: underline;
    transition: color 0.3s;
}

.admin-link:hover {
    color: #666;
}

body.dark .admin-link {
    color: #666;
}

body.dark .admin-link:hover {
    color: #999;
}

/* 페이지 전환 */
#mainPage {
    display: block;
}

#adminPage {
    display: none;
}

#mainPage.hidden {
    display: none;
}

#adminPage.active {
    display: block;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 350px;
    width: 90%;
}

.modal-content h2 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 18px;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--subtext);
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 15px;
    background: var(--bg);
    color: var(--text);
    box-sizing: border-box;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.cancel-btn, .login-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
}

.cancel-btn {
    background: #e0e0e0;
    color: #333;
}

.login-btn {
    background: #2a6edb;
    color: white;
}

.cancel-btn:hover {
    background: #d0d0d0;
}

.login-btn:hover {
    background: #1e5bbd;
}

/* 통계 카드 */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    color: white;
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0;
}

.stat-sub {
    font-size: 12px;
    opacity: 0.8;
}

/* 암호 변경 섹션 */
.password-section {
    background: rgba(0, 0, 0, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

body.dark .password-section {
    background: rgba(255, 255, 255, 0.05);
}

.password-section h3 {
    color: var(--text);
    margin-bottom: 15px;
    font-size: 16px;
}

.password-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--subtext);
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 10px;
    background: var(--card);
    color: var(--text);
    box-sizing: border-box;
}

.save-btn {
    width: 100%;
    padding: 14px;
    background: #43a047;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
}

.save-btn:hover {
    background: #388e3c;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
}

.back-btn:hover {
    background: #5a6268;
}

/* 최근 방문 통계 */
.recent-visitors {
    background: rgba(0, 0, 0, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

body.dark .recent-visitors {
    background: rgba(255, 255, 255, 0.05);
}

.recent-visitors h3 {
    color: var(--text);
    margin-bottom: 15px;
    font-size: 16px;
}

.week-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark .week-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.week-item:last-child {
    border-bottom: none;
}

.week-date {
    color: var(--subtext);
    font-size: 14px;
}

.week-count {
    color: var(--text);
    font-weight: bold;
    font-size: 14px;
}

/* 반응형 */
@media (max-width: 420px) {
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 28px;
    }
}