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

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 네비게이션 바 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-link:hover {
    opacity: 0.8;
}

.auth-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.auth-btn:hover {
    background: white;
    color: #667eea;
}

/* 메인 컨텐츠 */
#main-content {
    min-height: calc(100vh - 80px);
}

.page {
    display: none;
    padding: 2rem 0;
}

.page.active {
    display: block;
}

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

/* 홈 페이지 */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    margin: 2rem;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #7f8c8d;
}

.cta-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.cta-btn:hover {
    transform: translateY(-2px);
}

/* 폼 스타일 */
.meeting-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

/* 모임 목록 */
.meetings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.meeting-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.meeting-card:hover {
    transform: translateY(-5px);
}

.meeting-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.meeting-card .capacity {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.meeting-card .description {
    color: #555;
    line-height: 1.5;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

/* 인증 탭 */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e1e8ed;
}

.auth-tab {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    color: #7f8c8d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.auth-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* 모임 상세 페이지 */
.meeting-detail {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 0 auto;
    max-width: 800px;
}

.meeting-info-grid {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-item {
    border-bottom: 1px solid #e1e8ed;
    padding-bottom: 1rem;
}

.info-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.meeting-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e1e8ed;
    text-align: center;
}

.apply-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
    margin: 0 1rem;
}

.apply-btn:hover {
    transform: translateY(-2px);
}

.applicants-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
    margin: 0 1rem;
}

.applicants-btn:hover {
    transform: translateY(-2px);
}

.applied-badge {
    background: #95a5a6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.participation-status {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: left;
}

.participation-status p {
    margin: 0.3rem 0;
    color: #2c3e50;
}

.participation-status strong {
    color: #3498db;
}

/* 마이페이지 카드 스타일 */
.applied-meeting-card,
.created-meeting-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.applied-meeting-card:hover,
.created-meeting-card:hover {
    transform: translateY(-2px);
}

.applied-meeting-card h3,
.created-meeting-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e1e8ed;
    padding-bottom: 0.5rem;
}

.applied-meeting-card .meeting-info,
.created-meeting-card .meeting-info {
    margin-bottom: 1.5rem;
}

.applied-meeting-card .meeting-info p,
.created-meeting-card .meeting-info p {
    margin: 0.5rem 0;
    color: #555;
}

.applied-meeting-card .meeting-info strong,
.created-meeting-card .meeting-info strong {
    color: #2c3e50;
}

.applied-meeting-card .meeting-actions,
.created-meeting-card .meeting-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.view-detail-btn,
.applicants-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.view-detail-btn:hover,
.applicants-btn:hover {
    transform: translateY(-2px);
}

.applicants-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* 마이페이지 탭 */
.profile-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e1e8ed;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    color: #7f8c8d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

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

/* 에러 메시지 스타일 */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.error-message p {
    margin: 0.5rem 0;
    color: #c33;
}

/* 질문/답변 섹션 */
.qa-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.qa-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}



.question-form {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.question-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.question-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.submit-question-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.submit-question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.submit-question-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 질문/답변 목록 */
.qa-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.qa-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #3498db;
}

.question-content {
    margin-bottom: 1rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.question-author {
    font-weight: 600;
    color: #2c3e50;
}

.question-time {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.question-text {
    color: #34495e;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.answer-content {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-left: 1rem;
    border-left: 3px solid #27ae60;
}

.answer-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.answer-ai-badge {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.answer-time {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.answer-text {
    color: #2c3e50;
    line-height: 1.6;
}

.loading-answer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7f8c8d;
    font-style: italic;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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



.retry-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
}

.retry-btn:hover {
    background: #c0392b;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-section {
        margin: 1rem;
        padding: 2rem 1rem;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .meetings-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}
