/* ============================================
   기본 리셋 및 전역 스타일
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   메인 콘텐츠
   ============================================ */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   버튼 스타일
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

a.btn {
    text-align: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.btn-large {
    width: 100%;
    max-width: 400px;
    padding: 0.85rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ============================================
   알림 메시지 (헤더 중앙 고정)
   ============================================ */
#notification-container {
    position: fixed;
    top: 80px; /* 헤더 아래 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* 클릭 이벤트 통과 */
    max-width: 90%;
    width: 500px;
}

.notification-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: auto; /* 메시지는 클릭 가능 */
    text-align: center;
}

.notification-message.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-message.error-message {
    background-color: #e74c3c;
}

.notification-message.success-message {
    background-color: #2ecc71;
}

/* ============================================
   로딩 스타일
   ============================================ */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.loading-indicator {
    text-align: center;
    padding: 2rem 0;
    margin: 2rem 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #666;
    font-size: 0.95rem;
}

/* ============================================
   반응형 - 모바일
   ============================================ */
@media (max-width: 768px) {
    #notification-container {
        top: 60px; /* 모바일에서 헤더가 작을 경우 */
        width: 95%;
    }

    .notification-message {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   섹션 헤더
   ============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 2rem;
}

/* ============================================
   반응형 - 모바일
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}