/* 기본 스타일 */
* {
    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;
}

/* 헤더 스타일 */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    position: relative;
}

.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header h1 i {
    color: #3498db;
    margin-right: 15px;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 네비게이션 스타일 */
.navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    color: #7f8c8d;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    border: 2px solid transparent;
}

.nav-link:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: #2980b9;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* 페이지 스타일 */
.page {
    min-height: 60vh;
}

/* 메인 컨텐츠 */
.main-content {
    display: grid;
    gap: 30px;
}

/* 섹션 공통 스타일 */
section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

section h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

section h2 i {
    color: #3498db;
    margin-right: 10px;
}

/* 폼 스타일 */
.issue-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

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

/* 버튼 스타일 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* 섹션 헤더 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-controls,
.preview-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* 이슈 목록 */
.issues-list {
    display: grid;
    gap: 20px;
}

.issue-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.issue-item:hover {
    border-color: #3498db;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.issue-category {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-news { background: #e3f2fd; color: #1976d2; }
.category-exhibition { background: #f3e5f5; color: #7b1fa2; }
.category-policy { background: #e8f5e8; color: #388e3c; }
.category-technology { background: #fff3e0; color: #f57c00; }
.category-other { background: #fce4ec; color: #c2185b; }

.issue-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
}

.issue-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.issue-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.issue-link:hover {
    text-decoration: underline;
}

.issue-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.issue-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 뉴스레터 미리보기 */
.newsletter-preview {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    min-height: 400px;
}

.newsletter-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.newsletter-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.newsletter-date {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.newsletter-content {
    display: grid;
    gap: 25px;
}

.newsletter-section {
    margin-bottom: 30px;
}

.newsletter-section h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.newsletter-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
}

.newsletter-item h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.newsletter-item p {
    color: #555;
    line-height: 1.6;
}

.newsletter-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    text-align: center;
    color: #7f8c8d;
}

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

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls,
    .preview-controls {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    section {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .issue-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .issue-actions {
        flex-wrap: wrap;
    }
}

/* 로딩 애니메이션 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 빈 상태 메시지 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1.1rem;
}

/* 구독자 관리 스타일 */
.subscriber-form {
    display: grid;
    gap: 20px;
}

.subscribers-list {
    display: grid;
    gap: 15px;
}

.subscriber-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subscriber-item:hover {
    border-color: #3498db;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.subscriber-info {
    flex: 1;
}

.subscriber-email {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.subscriber-details {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.subscriber-actions {
    display: flex;
    gap: 10px;
}

/* 통계 그리드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* 구독 취소 페이지 */
.unsubscribe-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.unsubscribe-content {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.unsubscribe-form {
    margin: 30px 0;
}

.unsubscribe-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    font-weight: 600;
}

.unsubscribe-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.unsubscribe-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 구독 취소 링크 스타일 */
.unsubscribe-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.unsubscribe-link:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* 인증 페이지 스타일 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 50px;
    width: 100%;
    max-width: 600px;
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-header h1 i {
    color: #3498db;
    margin-right: 10px;
}

.auth-header p {
    color: #7f8c8d;
    font-size: 1rem;
}

.auth-form h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.auth-form h2 i {
    color: #3498db;
    margin-right: 8px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-switch a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-loading {
    text-align: center;
    padding: 40px 20px;
}

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

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

/* 대시보드 스타일 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.dashboard-card h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.dashboard-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 10px;
}

.dashboard-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 히스토리 테이블 */
.history-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.history-table th,
.history-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.history-table th {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: 600;
}

.history-table tr:hover {
    background: rgba(52, 152, 219, 0.05);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-sent {
    background: #d4edda;
    color: #155724;
}

.status-delivered {
    background: #cce5ff;
    color: #004085;
}

.status-opened {
    background: #fff3cd;
    color: #856404;
}

.status-bounced {
    background: #f8d7da;
    color: #721c24;
}

.status-failed {
    background: #f5c6cb;
    color: #721c24;
}

/* 로그인 페이지 반응형 디자인 */
@media (max-width: 768px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 30px 20px;
        max-width: 100%;
        margin: 0 10px;
    }
    
    .auth-header h1 {
        font-size: 1.8rem;
    }
    
    .auth-form h2 {
        font-size: 1.3rem;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .auth-header h1 {
        font-size: 1.6rem;
    }
    
    .auth-form h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
}
