/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 헤더 스타일 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    color: #718096;
    font-size: 1.1rem;
}

/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 게시판 헤더 */
.board-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    flex: 1;
    max-width: 400px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.board-actions {
    display: flex;
    gap: 10px;
}

/* 게시판 테이블 */
.board-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.board-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.board-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.board-table tr:hover {
    background-color: #f7fafc;
}

.title-cell {
    position: relative;
}

.post-title {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.post-title:hover {
    color: #667eea;
}

.file-icon {
    margin-left: 8px;
    font-size: 0.9rem;
}

.file-count {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* 글 작성 폼 */
.write-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
}

.file-info {
    display: block;
    margin-top: 8px;
    color: #718096;
    font-size: 0.9rem;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.form-actions .btn {
    margin: 0 10px;
}

/* 글 상세보기 */
.post-detail {
    max-width: 900px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.post-title {
    font-size: 2rem;
    color: #4a5568;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #718096;
}

.meta-item {
    display: flex;
    align-items: center;
}

.post-content {
    margin-bottom: 30px;
}

.content-text {
    background: #f7fafc;
    padding: 25px;
    border-radius: 10px;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* 첨부파일 */
.post-attachments {
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
}

.post-attachments h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.file-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.file-name {
    flex: 1;
    color: #4a5568;
    font-weight: 500;
}

/* 글 액션 */
.post-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.post-actions .btn {
    margin: 0 10px;
}

/* 푸터 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #718096;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .board-table {
        font-size: 0.9rem;
    }
    
    .board-table th,
    .board-table td {
        padding: 10px 8px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-item .btn {
        align-self: flex-end;
    }
}

/* 통계 페이지 */
.stats-container {
    max-width: 800px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 500;
}

.stats-details {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stats-details h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #4a5568;
}

.detail-value {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1rem;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.6s ease-out;
}
