/* CSS 변수 정의 */
:root {
    --primary-gradient: linear-gradient(45deg, #667eea, #764ba2);
    --background: rgba(255, 255, 255, 0.95);
    --text-color: #333333;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 컨테이너 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--background);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 헤더 */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    gap: 15px;
}

/* 헤더 상단 바 */
.header-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* 헤더 왼쪽 영역 */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 홈 버튼 스타일 */
#home-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#home-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* 인증 상태 영역 */
.auth-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 로그인 버튼 스타일 */
#login-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #3d8bfe 0%, #00d4fe 100%);
}

/* 사용자 이름 스타일 */
.user-name {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* 로그아웃 버튼 스타일 */
#logout-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
}

/* 헤더 콘텐츠 */
.header-content {
    text-align: center;
    flex-grow: 1;
}

/* 사용자 정보 */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.user-info .user-name {
    font-weight: 500;
    white-space: nowrap;
}

#logout-btn {
    padding: 6px 12px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #666;
    border-radius: 15px;
    transition: var(--transition);
}

#logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.header h1 {
    color: var(--text-color);
    font-size: 2.5em;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.header p {
    color: #666;
    font-size: 1.1em;
    margin: 5px 0 0 0;
    max-width: 600px;
    line-height: 1.4;
}

/* 설정 버튼 */
.btn-settings {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 10;
    pointer-events: auto;
    outline: none;
}

.btn-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.btn-settings:active {
    transform: translateY(0);
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
}

/* 설정 버튼 강화 */
#settings-btn {
    position: relative !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#settings-btn:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

#settings-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 메인 레이아웃 */
.main-layout {
    display: flex;
    gap: 30px;
    min-height: calc(100vh - 250px);
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* 왼쪽 패널 */
.left-panel {
    flex: 0 0 400px;
    min-width: 350px;
    max-width: 400px;
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    overflow-y: auto;
    max-height: calc(100vh - 280px);
    position: sticky;
    top: 20px;
}

/* 오른쪽 패널 */
.right-panel {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 280px);
    overflow: hidden;
}

/* 섹션 제목 */
.section-title {
    color: var(--text-color);
    font-size: 1.3em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* 키워드 입력 */
.keyword-input {
    display: flex;
    gap: 10px;
}

.keyword-input input {
    flex: 1;
}

/* 버튼 스타일 */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* 제목 목록 */
.title-list {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-top: 10px;
}

.title-item {
    padding: 15px 18px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    border-radius: 8px;
    margin: 5px 0;
    border: 2px solid transparent;
    position: relative;
}

.title-item:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.title-item:last-child {
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}

.title-item.selected {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border-color: #0d47a1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    font-weight: 600;
}

.title-item.selected::before {
    content: "✓";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 16px;
}

/* 프롬프트 영역 */
.prompt-area {
    min-height: 100px;
    resize: vertical;
}

/* 로딩 상태 */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* 콘텐츠 영역 */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 탭 스타일 */
.content-tabs {
    display: flex;
    background: #f0f0f0;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.content-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 14px;
}

.content-tab.active {
    background: #667eea;
    color: white;
}

/* 콘텐츠 패널 */
.content-panel {
    flex: 1;
    display: none;
    flex-direction: column;
}

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

/* 생성된 콘텐츠 */
.generated-content {
    flex: 1;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Georgia', serif;
    line-height: 1.6;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fafafa;
    max-height: 70vh;
    word-wrap: break-word;
    word-break: break-word;
}

.generated-content h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
}

.generated-content h2 {
    color: #444;
    margin: 25px 0 15px 0;
    font-size: 1.5em;
}

.generated-content h3 {
    color: #555;
    margin: 20px 0 10px 0;
    font-size: 1.2em;
}

.generated-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.generated-content ul, .generated-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.generated-content li {
    margin-bottom: 8px;
}

/* FAQ 스타일 - 생성된 콘텐츠 내부에서 사용 */
.generated-content .faq-container {
    margin: 20px 0;
}

.generated-content .faq-item {
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    background: white;
}

.generated-content .faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.generated-content .faq-question {
    background: #f8f9fa;
    padding: 15px 20px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    position: relative;
    border-bottom: 1px solid #e1e4e8;
    margin: 0;
}

.generated-content .faq-question::before {
    content: "Q.";
    color: #007bff;
    font-weight: bold;
    margin-right: 8px;
}

.generated-content .faq-question::after {
    content: "▼";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: #007bff;
}

.generated-content .faq-question.active::after {
    transform: translateY(-50%) rotate(180deg);
}

.generated-content .faq-answer {
    padding: 15px 20px;
    background: #fff;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.generated-content .faq-answer::before {
    content: "A.";
    color: #28a745;
    font-weight: bold;
    margin-right: 8px;
}

.generated-content .qa-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

/* 태그 섹션 */
.tags-section, .snippet-section, .image-prompts-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* 스니펫 정보 */
.snippet-info {
    margin-top: 10px;
}

.snippet-item {
    margin-bottom: 10px;
    font-size: 14px;
}

.snippet-item strong {
    color: var(--text-color);
    display: inline-block;
    width: 80px;
}

/* 이미지 프롬프트 */
.image-prompts-list {
    margin-top: 10px;
}

.image-prompt-item {
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: var(--transition);
}

.image-prompt-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.prompt-section h5 {
    margin-bottom: 8px;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
}

.prompt-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.prompt-text {
    flex: 1;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
    background: #f8f9fa;
    padding: 8px 10px;
    border-radius: 5px;
    max-width: calc(50% - 25px);
    overflow-wrap: break-word;
    word-break: break-word;
    border-left: 3px solid #667eea;
}

.copy-single-prompt {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 11px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: 2px;
    min-width: 60px;
}

.copy-single-prompt:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

/* 액션 버튼들 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 12px;
    font-size: 12px;
}

/* 상태 인디케이터 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-ready {
    background: var(--success-color);
}

.status-loading {
    background: var(--warning-color);
    animation: pulse 1s infinite;
}

.status-error {
    background: var(--error-color);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* 모달 스타일 */
.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);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    position: relative;
    z-index: 1001;
}

.modal-close:hover {
    background: #f0f0f0;
    color: var(--text-color);
}

.modal-close:active {
    background: #e0e0e0;
    transform: scale(0.95);
}

.modal-body {
    padding: 25px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* 로딩 오버레이 */
.loading-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 취소 버튼 */
.cancel-button {
    margin-top: 20px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.cancel-button:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.cancel-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* 체크박스 스타일 */
input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* 토글 스위치 스타일 */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

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

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

input:checked + .toggle-slider {
    background-color: #667eea;
}

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

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

/* 슬라이더 컨테이너 */
.slider-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.form-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

#max-tokens-value {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

/* 반응형 디자인 */

/* 대형 태블릿 및 작은 데스크톱 (1024px 이하) */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
        gap: 20px;
        min-height: auto;
        width: 100%;
    }
    
    .left-panel {
        flex: none;
        width: 100%;
        max-width: 100%;
        min-width: auto;
        position: static;
        max-height: none;
        order: 1;
        margin-bottom: 20px;
    }
    
    .right-panel {
        flex: none;
        width: 100%;
        max-width: 100%;
        min-width: auto;
        order: 2;
        min-height: 500px;
        overflow: visible;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .header-top {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .user-info {
        position: static;
        order: 1;
    }

    .btn-settings {
        order: 2;
        margin-top: 10px;
    }
}

/* 태블릿 (768px 이하) */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 20px;
        border-radius: 15px;
    }

    .header {
        margin-bottom: 25px;
        padding-bottom: 15px;
        gap: 10px;
    }

    .header h1 {
        font-size: 1.9em;
    }

    .header p {
        font-size: 1em;
    }

    .main-layout {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .left-panel,
    .right-panel {
        padding: 20px;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        flex: none;
    }

    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }

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

    .modal-content {
        width: 95%;
        margin: 2% auto;
        border-radius: 12px;
        max-height: 94vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .modal-header {
        padding: 15px 20px;
        flex-shrink: 0;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .modal-body {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-shrink: 0;
        border-top: 1px solid #e0e0e0;
        background: #fafafa;
    }

    .user-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 6px 12px;
    }

    /* 태그 섹션 태블릿 반응형 */
    .tags-section, .snippet-section, .image-prompts-section {
        padding: 12px;
        margin-top: 15px;
    }

    .tags-list {
        gap: 6px;
    }

    .tag {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.6em;
        line-height: 1.3;
    }

    .header p {
        font-size: 0.9em;
        line-height: 1.3;
    }

    .main-layout {
        gap: 10px;
        width: 100%;
        padding: 0;
    }

    .left-panel,
    .right-panel {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        flex: none;
        margin: 0;
    }

    .btn-settings {
        padding: 8px 16px;
        font-size: 13px;
    }

    .user-info {
        font-size: 13px;
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }

    .content-tabs {
        flex-direction: column;
        gap: 2px;
    }

    .content-tab {
        text-align: left;
        padding: 10px 15px;
        border-radius: 8px;
        margin-bottom: 2px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .keyword-input {
        flex-direction: column;
        gap: 8px;
    }

    .keyword-input input,
    .keyword-input button {
        width: 100%;
    }
    
    /* 모바일 모달 최적화 */
    .modal-content {
        width: 98%;
        margin: 1% auto;
        border-radius: 10px;
        max-height: 95vh;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        padding: 12px 16px;
        flex-shrink: 0;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .modal-header h2 {
        font-size: 1.1em;
        margin: 0;
    }
    
    .modal-body {
        padding: 15px 16px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
    }
    
    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
        flex-shrink: 0;
        border-top: 1px solid #e0e0e0;
        background: #fafafa;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0;
        padding: 12px;
        font-size: 14px;
    }
    
    /* 모바일에서 모달 닫기 버튼 크기 증가 */
    .modal-close {
        width: 44px;
        height: 44px;
        font-size: 28px;
        background: rgba(0, 0, 0, 0.1);
        border: 2px solid rgba(0, 0, 0, 0.2);
    }
    
    .modal-close:active {
        background: rgba(0, 0, 0, 0.2);
        transform: scale(0.9);
    }
    
    /* 모달 내 폼 요소 모바일 최적화 */
    .modal-body .form-group {
        margin-bottom: 15px;
    }
    
    .modal-body .form-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: 600;
    }
    
    .modal-body input,
    .modal-body select,
    .modal-body textarea {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
    }
    
    /* 가상 키보드 대응 */
    .modal {
        padding: 0;
        align-items: center;
        justify-content: center;
    }
    
    /* 설정 모달 내용 최적화 */
    .modal-body .form-group:last-child {
        margin-bottom: 10px;
    }
    
    .modal-body label {
        font-size: 13px;
    }
    
    .modal-body input,
    .modal-body select {
        font-size: 14px;
        min-height: 44px; /* 터치 영역 최소 크기 */
    }
}

/* 프롬프트 헤더 */
.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.prompt-header label {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}

/* 기본 프롬프트 설정 모달 */
.modal-large {
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
}

.modal-large .modal-body {
    max-height: calc(85vh - 120px);
    overflow-y: auto;
}

/* 프롬프트 탭 */
.prompt-tabs {
    display: flex;
    background: #f0f0f0;
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.prompt-tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 14px;
    color: #666;
}

.prompt-tab.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.prompt-tab:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    color: #333;
}

/* 프롬프트 패널 */
.prompt-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

/* 프롬프트 에디터 */
.prompt-editor {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 300px;
}

/* CSS 편집기 스타일 */
.css-editor-container {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.css-subtabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    padding: 0;
}

.css-subtab {
    background: none;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    position: relative;
}

.css-subtab:hover {
    background: #e9ecef;
    color: #333;
}

.css-subtab.active {
    color: #007bff;
    background: #fff;
    border-bottom-color: #007bff;
    font-weight: 500;
}

.css-panel {
    display: none;
    padding: 0;
}

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

.css-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.css-editor-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.css-actions {
    display: flex;
    gap: 8px;
}

.css-editor {
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: none;
    outline: none;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #fff;
    resize: vertical;
    tab-size: 2;
}

.css-editor:focus {
    background: #fefefe;
    box-shadow: inset 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* CSS 구문 하이라이팅 효과 (기본적인) */
.css-editor {
    color: #333;
}

/* CSS 편집기 반응형 스타일 */
@media (max-width: 1024px) {
    .css-subtabs {
        flex-wrap: nowrap;
        padding: 0 10px;
    }
    
    .css-subtab {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .css-editor-header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .css-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .css-editor {
        padding: 15px;
        font-size: 13px;
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    .css-subtabs {
        padding: 0 5px;
    }
    
    .css-subtab {
        padding: 8px 10px;
        font-size: 12px;
        min-width: auto;
    }
    
    .css-editor-header {
        padding: 10px 12px;
    }
    
    .css-editor-header h4 {
        font-size: 14px;
    }
    
    .css-actions .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .css-editor {
        min-height: 300px;
        padding: 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .css-subtabs {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .css-subtab {
        padding: 8px;
        font-size: 11px;
    }
    
    .css-editor {
        min-height: 250px;
        padding: 10px;
        font-size: 11px;
    }
}

/* 파일 업로드 영역 */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.upload-placeholder span {
    display: block;
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.upload-placeholder p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 템플릿 액션 */
.template-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.template-actions input {
    flex: 1;
}

/* 저장된 템플릿 */
.saved-templates {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.template-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.template-item:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.template-name {
    font-weight: 600;
    color: var(--text-color);
}

.template-actions-btn {
    display: flex;
    gap: 5px;
}

.template-actions-btn .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 업로드된 파일 */
.uploaded-files {
    margin-top: 15px;
}

.uploaded-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name {
    font-weight: 500;
    color: #1976d2;
}

.file-size {
    font-size: 12px;
    color: #666;
}

/* 체크박스 그룹 */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-group label:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
}

/* 반응형 - 프롬프트 모달 */
@media (max-width: 768px) {
    .modal-large {
        width: 95%;
        max-height: 90vh;
    }
    
    .prompt-tabs {
        flex-direction: column;
        gap: 2px;
    }
    
    .prompt-tab {
        text-align: left;
        padding: 10px 15px;
        border-radius: 6px;
        margin-bottom: 2px;
    }
    
    .css-examples {
        gap: 15px;
    }
    
    .css-example-item h4 {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .template-actions {
        flex-direction: column;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .prompt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 선택 영역 스타일 */
::selection {
    background: rgba(102, 126, 234, 0.2);
}

/* 포커스 스타일 */
*:focus {
    outline: 2px solid rgba(102, 126, 234, 0.3);
    outline-offset: 2px;
}

/* 애니메이션 */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

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


/* 설정 모달 강화 */
#settings-modal {
    position: fixed !important;
    z-index: 10000 !important;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#settings-modal.show,
#settings-modal[style*="display: block"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#settings-modal .modal-content {
    position: relative;
    z-index: 10001;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 제목 목록 헤더 */
.title-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* 제목 입력 헤더 */
.title-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.title-input-header label {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}

.title-list-header label {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}

/* 새로고침 버튼 */
.btn-refresh {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    width: 36px;
    height: 36px;
}

.btn-refresh:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    transform: rotate(180deg);
}

.btn-refresh:active {
    transform: rotate(180deg) scale(0.95);
}

.btn-refresh svg {
    transition: var(--transition);
}

.btn-refresh:hover svg {
    color: #007bff;
}

/* 새로고침 애니메이션 */
.btn-refresh.refreshing {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .title-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .btn-refresh {
        align-self: flex-end;
    }
}

/* 복사 가능한 컨테이너 */
.copyable-container {
    position: relative;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    max-width: 100%;
    max-height: 1500px;
    overflow: visible;
}

.copyable-content {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    white-space: pre-wrap;
    word-break: break-word;
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    min-height: 200px;
    max-height: 1500px;
    overflow-y: visible;
    overflow-x: auto;
    resize: vertical;
    max-width: 100%;
}

/* HTML 소스 탭 전용 스타일 */
#tags-tab .copyable-container {
    margin: 0;
    padding: 10px;
    background: #f1f3f4;
}

#tags-tab .copyable-content {
    font-size: 13px;
    line-height: 1.4;
    max-height: 1500px;
    overflow-x: auto;
    overflow-y: visible;
    border: 2px solid #dee2e6;
    background: #ffffff;
    word-break: break-word;
}

/* HTML 소스 컨테이너 스타일 */
.html-source-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.source-header {
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    border: 1px solid #dee2e6;
    border-bottom: none;
}

.source-header h4 {
    margin: 0 0 5px 0;
    color: #495057;
    font-size: 16px;
}

.source-header small {
    color: #6c757d;
    font-size: 12px;
}

.source-content {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.html-source {
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #2d3748;
    overflow-x: auto;
    overflow-y: auto;
    min-height: 200px;
    max-height: 80vh;
    height: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border: none;
}

.html-source code {
    background: none;
    padding: 0;
    border: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.btn-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* 코드 포맷팅 */
.code-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.code-display h1 {
    color: #dc3545;
    font-size: 18px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #dc3545;
}

.code-display h2 {
    color: #007bff;
    font-size: 16px;
    margin: 20px 0 10px 0;
    padding-left: 10px;
    border-left: 4px solid #007bff;
}

.code-display h3 {
    color: #28a745;
    font-size: 14px;
    margin: 15px 0 8px 0;
    padding-left: 15px;
    border-left: 3px solid #28a745;
}

.code-display p {
    margin: 10px 0;
    padding-left: 20px;
    text-indent: 0;
}

.code-display ul {
    margin: 10px 0;
    padding-left: 40px;
}

.code-display li {
    margin: 5px 0;
    list-style-type: disc;
}

/* 태그 한줄 표시 */
.tags-inline {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.tags-comma {
    color: #6c757d;
    margin: 0 5px;
}

/* HTML 소스 코드 표시 스타일 */
.html-source-container {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.source-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
}

.source-header h4 {
    color: #495057;
    font-size: 16px;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.source-header small {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
}

.html-source {
    background: #f8f9fa;
    margin: 0;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #495057;
    overflow-x: auto;
    min-height: 150px;
    max-height: 75vh;
    height: auto;
    overflow-y: auto;
    border: none;
}

.html-source code {
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    white-space: pre;
    display: block;
}

/* 스크롤바 스타일링 */
.html-source::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.html-source::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.html-source::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

.html-source::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* 모바일 모달 스크롤 최적화 */
/* 모바일 반응형 - HTML 소스 탭 */
@media (max-width: 768px) {
    /* HTML 소스 탭 모바일 최적화 */
    #tags-tab .copyable-container {
        padding: 8px;
        margin: 5px 0;
    }
    
    #tags-tab .copyable-content {
        font-size: 12px;
        line-height: 1.3;
        padding: 12px;
        max-height: 1500px;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 제목 아이템 모바일 최적화 */
    .title-item {
        padding: 12px 15px;
        font-size: 13px;
        margin: 3px 0;
    }
    
    .title-item.selected {
        transform: none;
        box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    }
    
    /* 복사 버튼 모바일 최적화 */
    .btn-copy {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 10px;
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }
    
    /* HTML 소스 모바일 최적화 */
    .source-header {
        padding: 12px;
    }
    
    .source-header h4 {
        font-size: 14px;
    }
    
    .source-header small {
        font-size: 11px;
    }
    
    .html-source {
        padding: 15px;
        font-size: 12px;
        line-height: 1.3;
        min-height: 120px;
        max-height: 70vh;
        height: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .modal-body::-webkit-scrollbar {
        width: 6px;
    }
    
    .modal-body::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .modal-body::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }
    
    /* iOS 터치 스크롤 최적화 */
    .modal-body {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #ccc transparent;
    }
    
    /* 모달 포지션 중앙 정렬 */
    .modal-content {
        margin: auto;
        transform: translateY(-50%);
        position: relative;
        top: 50%;
    }

    /* 태그 섹션 모바일 반응형 */
    .tags-section, .snippet-section, .image-prompts-section {
        padding: 10px;
        margin-top: 12px;
        border-radius: 8px;
    }

    .tags-section h3, .snippet-section h3, .image-prompts-section h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    /* 이미지 프롬프트 모바일 반응형 */
    .prompt-content {
        flex-direction: column;
        gap: 8px;
    }

    .prompt-text {
        font-size: 12px;
        padding: 6px 8px;
    }

    .copy-single-prompt {
        align-self: flex-end;
        font-size: 10px;
        padding: 3px 6px;
    }

    /* FAQ 모바일 반응형 */
    .generated-content .faq-question,
    .generated-content .faq-answer {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .generated-content .faq-question::after {
        right: 15px;
        font-size: 12px;
    }
    
    .generated-content .faq-item {
        margin-bottom: 12px;
    }

    .tags-list {
        gap: 5px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .tag {
        font-size: 10px;
        padding: 3px 8px;
        border-radius: 15px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* HTML 소스창 모바일 최적화 */
    .generated-content pre {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 11px;
        line-height: 1.3;
        padding: 10px;
        border-radius: 6px;
    }
}

/* 8단계 진행 상황 표시 스타일 */
.stage-progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.progress-header h3 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 1.4em;
    text-align: center;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.stage-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1em;
}

.progress-message {
    font-style: italic;
    opacity: 0.9;
    text-align: center;
    flex: 1;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-percentage {
    font-weight: bold;
    font-size: 1.1em;
    min-width: 45px;
    text-align: right;
}

.stage-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.stage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stage-item.completed {
    background: rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.stage-item.current {
    background: rgba(255, 193, 7, 0.3);
    border: 1px solid rgba(255, 193, 7, 0.5);
    animation: pulse 2s infinite;
}

.stage-item.pending {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.7;
}

.stage-icon {
    font-size: 1.2em;
    min-width: 24px;
}

.stage-text {
    font-weight: 500;
}

.content-preview {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.content-preview h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1em;
}

.preview-content {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: white;
    font-size: 0.9em;
    line-height: 1.5;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 8단계 진행 상황 모바일 반응형 */
@media (max-width: 768px) {
    .stage-progress {
        padding: 15px;
        margin: 10px 0;
    }
    
    .progress-info {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .stage-counter {
        font-size: 1em;
        padding: 6px 12px;
    }
    
    .stage-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .stage-item {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    .stage-icon {
        font-size: 1em;
        min-width: 20px;
    }
    
    .content-preview {
        padding: 15px;
    }
    
    .preview-content {
        max-height: 200px;
        padding: 10px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .stage-list {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .stage-item {
        padding: 5px 8px;
        font-size: 0.8em;
    }
    
    .stage-text {
        font-size: 0.9em;
    }
}

/* 추가 유틸리티 CSS */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-100 { width: 100%; }
.w-75 { width: 75%; }
.w-50 { width: 50%; }
.w-25 { width: 25%; }

.h-100 { height: 100%; }
.h-auto { height: auto; }

.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); }
.shadow-lg { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06); }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-gray-600 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #16a34a; }
.text-red-600 { color: #dc2626; }

.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-red-50 { background-color: #fef2f2; }

.border { border: 1px solid #e5e7eb; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.transition { transition: all 0.15s ease-in-out; }
.transition-colors { transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out; }

.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-blue-50:hover { background-color: #eff6ff; }
.hover\:text-blue-600:hover { color: #2563eb; }

.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5); }

/* 이미지 프롬프트 스타일 */
.image-prompt-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.image-prompt-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.prompt-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    min-height: 200px;
}

.prompt-korean,
.prompt-english {
    flex: 1;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.prompt-korean h6,
.prompt-english h6 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prompt-text-kr {
    font-size: 15px;
    line-height: 1.6;
    color: #495057;
    margin: 0;
    word-break: keep-all;
}

.prompt-text-vertical {
    font-size: 13px;
    line-height: 1.6;
    color: #495057;
    margin: 0;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    height: 100%;
    text-align: left;
}

.copy-single-prompt {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.copy-single-prompt:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.prompt-section h5 {
    color: #343a40;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .prompt-layout {
        flex-direction: column;
        gap: 15px;
        min-height: auto;
    }
    
    .prompt-text-vertical {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        height: auto;
    }
    
    .image-prompt-item {
        padding: 20px;
        margin-bottom: 20px;
    }
}
