/* 공통 CSS 스타일 */
* { 
    box-sizing: border-box; 
}

body { 
    font-family: Arial, sans-serif; 
    margin: 0; 
    padding: 10px; 
    background: #f5f5f5; 
    line-height: 1.6;
}

/* 헤더 스타일 */
.header { 
    background: white; 
    padding: 15px; 
    border-radius: 10px; 
    margin-bottom: 15px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.header h1 { 
    margin: 0 0 10px 0; 
    font-size: 24px; 
    color: #333; 
}

.nav-links { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
}

.nav-links a { 
    padding: 8px 12px; 
    text-decoration: none; 
    color: #007bff; 
    background: #f8f9fa; 
    border-radius: 5px; 
    font-size: 14px; 
    transition: background-color 0.3s;
}

.nav-links a:hover { 
    background: #e9ecef; 
}

/* 컨테이너 스타일 */
.container { 
    background: white; 
    padding: 20px; 
    border-radius: 10px; 
    margin-bottom: 15px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

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

.stat-card { 
    background: white; 
    padding: 20px; 
    border-radius: 10px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    text-align: center; 
}

.stat-number { 
    font-size: 28px; 
    font-weight: bold; 
    color: #007bff; 
    margin-bottom: 5px; 
}

.stat-label { 
    color: #666; 
    font-size: 14px; 
}

.chart-container { 
    background: white; 
    padding: 20px; 
    border-radius: 10px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    margin-bottom: 20px; 
    height: 460px; 
    width: 100%;
    overflow: hidden; 
}

.chart-container h3 { 
    margin: 0 0 15px 0; 
    color: #333; 
    font-size: 18px; 
}

.chart-info {
    margin-top: 10px;
    text-align: center;
}

.chart-info p {
    margin: 0;
    color: #666;
    font-size: 12px;
}

.chart-info small {
    color: #999;
}

.recent-urls { 
    background: white; 
    padding: 20px; 
    border-radius: 10px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    margin-bottom: 20px; 
}

.recent-urls h3 { 
    margin: 0 0 15px 0; 
    color: #333; 
    font-size: 18px; 
}

.url-item { 
    padding: 10px 0; 
    border-bottom: 1px solid #eee; 
}

.url-item:last-child { 
    border-bottom: none; 
}

.url-short { 
    font-weight: bold; 
    color: #007bff; 
    word-break: break-all; 
}

.url-original { 
    color: #666; 
    font-size: 14px; 
    word-break: break-all; 
    margin-top: 5px; 
}

.action-buttons { 
    display: flex; 
    gap: 10px; 
    margin-top: 20px; 
    flex-wrap: wrap; 
}

/* 폼 스타일 */
.form-group { 
    margin-bottom: 20px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: bold; 
    color: #333; 
    font-size: 14px;
}

.form-input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    font-size: 16px; 
    box-sizing: border-box; 
    transition: border-color 0.3s ease;
}

.form-input:focus { 
    outline: none; 
    border-color: #007bff; 
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25); 
}

.form-select { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    font-size: 16px; 
    box-sizing: border-box; 
}

.form-checkbox { 
    margin-right: 8px; 
    transform: scale(1.2);
}

/* 버튼 스타일 */
.btn { 
    padding: 8px 16px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    text-decoration: none; 
    display: inline-block; 
    font-size: 14px; 
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-right: 8px;
    margin-bottom: 8px;
}

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

.btn-primary:hover { 
    background: #0056b3; 
}

.btn-secondary { 
    background: #6c757d; 
    color: white; 
}

.btn-secondary:hover { 
    background: #545b62; 
}

.btn-success { 
    background: #28a745; 
    color: white; 
}

.btn-success:hover { 
    background: #218838; 
}

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

.btn-danger:hover { 
    background: #c82333; 
}

.btn-warning { 
    background: #ffc107; 
    color: #212529; 
}

.btn-warning:hover { 
    background: #e0a800; 
}

/* 메시지 스타일 */
.error-message { 
    background: #f8d7da; 
    color: #721c24; 
    padding: 15px; 
    border-radius: 5px; 
    margin-bottom: 20px; 
    border: 1px solid #f5c6cb;
}

.success-message { 
    background: #d4edda; 
    color: #155724; 
    padding: 15px; 
    border-radius: 5px; 
    margin-bottom: 20px; 
    border: 1px solid #c3e6cb;
}

/* 섹션 제목 */
.section-title { 
    color: #333; 
    margin-bottom: 15px; 
    font-size: 18px; 
    border-bottom: 2px solid #007bff; 
    padding-bottom: 5px; 
}

/* 테이블 스타일 */
.table-container { 
    background: white; 
    border-radius: 10px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    overflow: hidden; 
    margin-bottom: 15px;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
}

th { 
    background: #f8f9fa; 
    padding: 15px 10px; 
    text-align: left; 
    border-bottom: 2px solid #dee2e6; 
    font-weight: bold; 
    font-size: 14px;
}

td { 
    padding: 12px 10px; 
    border-bottom: 1px solid #dee2e6; 
    font-size: 14px;
}

tr:hover { 
    background: #f8f9fa; 
}

/* 상태 표시 */
.status-active { 
    color: #28a745; 
    font-weight: bold; 
}

.status-inactive { 
    color: #dc3545; 
    font-weight: bold; 
}

/* OG 이미지 */
.og-image { 
    max-width: 40px; 
    max-height: 40px; 
    border-radius: 3px; 
    object-fit: cover;
}

/* 빈 메시지 */
.empty-message { 
    text-align: center; 
    padding: 40px 20px; 
    color: #666; 
}

/* 페이징 */
.pagination { 
    text-align: center; 
    margin: 20px 0; 
}

.pagination a, .pagination b { 
    padding: 8px 12px; 
    margin: 0 2px; 
    text-decoration: none; 
    border-radius: 3px; 
}

.pagination a { 
    background: #007bff; 
    color: white; 
}

.pagination b { 
    background: #6c757d; 
    color: white; 
}

.pagination a:hover { 
    background: #0056b3; 
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    body { 
        padding: 5px; 
    }
    
    .header { 
        padding: 15px; 
    }
    
    .header h1 { 
        font-size: 20px; 
    }
    
    .nav-links { 
        flex-direction: column; 
    }
    
    .nav-links a { 
        text-align: center; 
        padding: 10px; 
    }
    
    .container { 
        padding: 15px; 
    }
    
    .section-title { 
        font-size: 16px; 
    }
    
    .form-input, .form-select { 
        font-size: 16px; 
        padding: 15px; 
    }
    
    .btn { 
        padding: 10px; 
        font-size: 14px; 
        width: 100%; 
        margin-right: 0; 
    }
    
    table { 
        font-size: 0.9em; 
    }
    
    th, td { 
        padding: 8px 5px; 
    }
    
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    
    .stat-card { 
        padding: 15px; 
    }
    
    .stat-number { 
        font-size: 24px; 
    }
    
    .stat-label { 
        font-size: 12px; 
    }
    
    .chart-container, .recent-urls { 
        padding: 15px; 
    }
    
    .chart-container {
        height: 450px;
    }
    
    .chart-container h3, .recent-urls h3 { 
        font-size: 16px; 
    }
    
    .action-buttons { 
        flex-direction: column; 
    }
    
    .btn { 
        width: 100%; 
        min-width: auto; 
    }
}

@media (max-width: 480px) {
    .container { 
        padding: 10px; 
    }
    
    .section-title { 
        font-size: 15px; 
    }
    
    .form-group { 
        margin-bottom: 15px; 
    }
    
    .form-input, .form-select { 
        padding: 12px; 
    }
    
    .btn { 
        padding: 8px; 
    }
    
    .stats-grid { 
        grid-template-columns: 1fr; 
    }
    
    .stat-card { 
        padding: 12px; 
    }
    
    .stat-number { 
        font-size: 20px; 
    }
} 