/* AI 자동 블로그 - 메인 스타일시트 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* 레이아웃 */
.app-container {
    display: flex;
    height: 100vh;
}

/* 사이드바 */
.sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    background: #34495e;
    text-align: center;
    border-bottom: 2px solid #1a252f;
}

.sidebar-header h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.sidebar-header .subtitle {
    font-size: 12px;
    opacity: 0.8;
}

/* 네비게이션 */
.nav-section {
    margin-bottom: 2px;
}

.nav-header {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
    background: rgba(255,255,255,0.05);
}

.nav-header:hover {
    background: rgba(255,255,255,0.1);
}

.nav-header i {
    width: 20px;
    text-align: center;
}

.toggle-icon {
    margin-left: auto;
    transition: transform 0.3s;
}

.nav-section.active .toggle-icon {
    transform: rotate(180deg);
}

.nav-items {
    list-style: none;
    display: none;
    background: rgba(0,0,0,0.2);
}

.nav-section.active .nav-items {
    display: block;
}

.nav-items a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 40px;
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-items a:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 45px;
}

/* 메인 컨텐츠 영역 */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

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

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

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 24px;
    color: #2c3e50;
}

.panel-content {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* 폼 요소 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

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

.content-editor {
    min-height: 400px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    resize: vertical;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.8;
}

/* 버튼 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* 카테고리 리스트 */
.category-list {
    display: grid;
    gap: 15px;
}

.category-item {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.category-item:hover {
    border-color: #3498db;
    transform: translateX(5px);
}

.category-info h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.category-info span {
    font-size: 13px;
    color: #7f8c8d;
}

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

/* 뉴스 설정 */
.news-settings {
    background: white;
    border-radius: 12px;
    padding: 25px;
}

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

.setting-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.keyword-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-tag {
    background: #3498db;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keyword-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* 체크박스 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close {
    font-size: 30px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 토스트 알림 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    animation: slideUp 0.3s ease-out;
    z-index: 1001;
}

.toast.show {
    display: block;
}

.toast.error {
    background: #e74c3c;
}

/* 스위치 토글 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #3498db;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

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

/* 로딩 애니메이션 */
.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); }
}

/* 발행 옵션 */
.publish-options {
    margin-bottom: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.platform-selection h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* 헤더 액션 */
.header-actions {
    display: flex;
    gap: 10px;
}

/* 아이디어 카드 */
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.idea-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.idea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.idea-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.idea-card p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
}

.idea-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #95a5a6;
}

.idea-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 대시보드 추가 스타일 */
.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.activity-item i {
    font-size: 20px;
    width: 30px;
    text-align: center;
}

.activity-content p {
    margin: 0;
    font-weight: 500;
}

.activity-content small {
    color: #7f8c8d;
}

.popular-post {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.popular-post:last-child {
    border-bottom: none;
}

.popular-post .rank {
    font-size: 20px;
    font-weight: bold;
    color: #3498db;
    width: 30px;
    text-align: center;
}

.post-info h5 {
    margin: 0 0 5px 0;
    font-size: 15px;
}

.post-info small {
    color: #7f8c8d;
}

.category-stat {
    margin-bottom: 20px;
}

.category-stat:last-child {
    margin-bottom: 0;
}

.category-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.category-bar {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(to right, #3498db, #2ecc71);
    transition: width 0.5s ease;
}

.category-count {
    font-size: 13px;
    color: #7f8c8d;
}

/* 실제 작동하는 탭 전환 */
.content-panel {
    display: none;
}

.content-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* 폼 액션 버튼 */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .ideas-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        left: 20px;
    }
}
/* 토스트 알림 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 14px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: #e74c3c;
}

/* 스위치 토글 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #3498db;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}
