/**
 * MetaRoot Math - Custom CSS
 * 추가적인 커스텀 스타일
 */

/* 폼 페이지 공통 스타일 */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--color-text-light);
    font-size: 1rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
    outline: none;
}

.auth-form input.error {
    border-color: var(--color-error);
}

.auth-form .checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form .checkbox-wrapper input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.auth-form .submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1rem;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: var(--color-text-light);
}

/* 마이페이지 스타일 */
.mypage-container {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.mypage-sidebar {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.mypage-sidebar .user-info {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-bg);
    margin-bottom: 1.5rem;
}

.mypage-sidebar .user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: white;
}

.mypage-menu {
    list-style: none;
    padding: 0;
}

.mypage-menu li {
    margin-bottom: 0.5rem;
}

.mypage-menu a {
    display: block;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mypage-menu a:hover,
.mypage-menu a.active {
    background: var(--color-primary);
    color: white;
}

.mypage-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.mypage-section {
    margin-bottom: 2rem;
}

.mypage-section h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-bg);
}

.info-row {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    flex: 0 0 150px;
    font-weight: 600;
    color: var(--color-text);
}

.info-value {
    flex: 1;
    color: var(--color-text-light);
}

/* 사이트맵 스타일 */
.sitemap-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.sitemap-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

.sitemap-section h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-bg);
}

.sitemap-section ul {
    list-style: none;
    padding: 0;
}

.sitemap-section li {
    margin-bottom: 0.75rem;
}

.sitemap-section a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sitemap-section a::before {
    content: "→";
    color: var(--color-primary);
}

.sitemap-section a:hover {
    color: var(--color-primary);
}

/* 법적 문서 페이지 스타일 */
.legal-document {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.legal-document .document-header {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-document .document-header h1 {
    color: var(--color-primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.legal-document .document-header .update-date {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.legal-document .document-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    line-height: 1.8;
}

.legal-document h2 {
    color: var(--color-primary);
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-document h3 {
    color: var(--color-text);
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-document ol,
.legal-document ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-document li {
    margin-bottom: 0.5rem;
}

.legal-document .highlight {
    background-color: #fff3cd;
    padding: 1rem;
    border-left: 4px solid var(--color-warning);
    margin: 1.5rem 0;
}

/* 알림 메시지 스타일 개선 */
.message-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInDown 0.3s ease-out;
}

.message-box.success {
    background-color: #d4edda;
    border-left: 4px solid var(--color-success);
    color: #155724;
}

.message-box.error {
    background-color: #f8d7da;
    border-left: 4px solid var(--color-error);
    color: #721c24;
}

.message-box.warning {
    background-color: #fff3cd;
    border-left: 4px solid var(--color-warning);
    color: #856404;
}

.message-box.info {
    background-color: #d1ecf1;
    border-left: 4px solid var(--color-primary);
    color: #0c5460;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-bg);
}

.modal-header h3 {
    margin: 0;
    color: var(--color-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-error);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

/* 반응형 개선 */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.75rem;
    }

    .mypage-container {
        margin: 1.5rem auto;
    }

    .mypage-content,
    .mypage-sidebar {
        padding: 1.5rem;
    }

    .legal-document .document-content {
        padding: 2rem 1.5rem;
    }

    .info-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .info-label {
        flex: none;
    }

    .sitemap-grid {
        grid-template-columns: 1fr;
    }
}

/* 추가 유틸리티 클래스 */
.text-muted {
    color: var(--color-text-light) !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-success {
    color: var(--color-success) !important;
}

.text-error {
    color: var(--color-error) !important;
}

.bg-light {
    background-color: var(--color-bg) !important;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

.shadow {
    box-shadow: var(--box-shadow) !important;
}

.shadow-hover {
    transition: var(--transition);
}

.shadow-hover:hover {
    box-shadow: var(--box-shadow-hover) !important;
}
