﻿        :root {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --secondary: #ec4899;
            --accent: #8b5cf6;
            --bg-body: #f8fafc;
            --glass-bg: rgba(255, 255, 255, 0.7);
            --glass-border: rgba(255, 255, 255, 0.2);
            --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
            --header-height: 70px;
        }

        * {
            font-family: 'Outfit', 'Noto Sans KR', sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-body);
            color: #1e293b;
            line-height: 1.5;
            overflow-x: hidden;
        }

        /* --- [영자의 마법: Glassmorphism] --- */
        .glass-card {
            background: var(--glass-bg);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--glass-border);
            box-shadow: var(--card-shadow);
        }

        .loader {
            border: 3px solid #f1f5f9;
            border-top: 3px solid var(--primary);
            border-radius: 50%;
            width: 30px;
            height: 30px;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            100% {
                transform: rotate(360deg);
            }
        }

        /* --- [세련된 버튼 시스템] --- */
        .btn-modern {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 24px;
            border-radius: 14px;
            font-weight: 600;
            font-size: 15px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
            border: none;
            cursor: pointer;
            gap: 8px;
        }

        .btn-modern:active {
            transform: scale(0.96);
        }

        .btn-primary {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            color: white;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
        }

        .btn-success {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        }

        .btn-danger {
            background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
            color: white;
        }

        .btn-pink {
            background: linear-gradient(135deg, #f472b6 0%, #db2777 100%);
            color: white;
        }

        /* --- [모바일 최적화 레이아웃] --- */
        .app-container {
            width: 100%;
            min-height: 100vh;
            position: relative;
        }

        .header-modern {
            background: var(--glass-bg);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            position: sticky;
            top: 0;
            z-index: 40;
            border-bottom: 1px solid var(--glass-border);
            padding: 16px 20px;
        }

        .tab-nav {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
            background: #f1f5f9;
            padding: 6px;
            border-radius: 16px;
            margin: 16px 20px;
        }

        .tab-btn {
            padding: 10px 2px;
            font-size: 11px;
            font-weight: 600;
            text-align: center;
            border-radius: 10px;
            color: #64748b;
            transition: all 0.2s;
            cursor: pointer;
            border: 1px solid transparent;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }

        .tab-btn.active {
            background: white;
            color: var(--primary);
            border-color: rgba(99, 102, 241, 0.1);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            font-weight: 800;
        }

        .tab-btn span {
            font-size: 16px;
        }

        #log-container {
            background: #0f172a;
            border-radius: 20px;
            padding: 16px;
            font-family: 'Monaco', 'Courier New', monospace;
            font-size: 11px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
            max-height: 250px;
            overflow-y: auto;
        }

        .log-time {
            color: #64748b;
            font-weight: bold;
            margin-right: 8px;
        }

        .log-info {
            color: #94a3b8;
        }

        .log-success {
            color: #4ade80;
            font-weight: bold;
        }

        /* --- [다국어 타이포그래피] --- */
        .en-font {
            font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            letter-spacing: -0.02em;
        }

        .ko-font {
            font-family: 'Noto Sans KR', -apple-system, sans-serif;
            letter-spacing: -0.03em;
        }

        /* --- [Generated Content Preview Styles] --- */
        .post-content h2 {
            margin-top: 2rem;
            margin-bottom: 1rem;
        }

        .post-content h3 {
            margin-top: 1.5rem;
            margin-bottom: 0.75rem;
        }

        .log-warn {
            color: #facc15;
        }

        .log-process {
            color: #60a5fa;
            font-style: italic;
        }

        .input-modern {
            width: 100%;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            padding: 14px 18px;
            border-radius: 16px;
            font-size: 15px;
            transition: all 0.2s;
        }

        .input-modern:focus {
            outline: none;
            border-color: var(--primary);
            background: white;
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        }

        .card-modern {
            background: white;
            border-radius: 24px;
            padding: 24px;
            border: 1px solid #f1f5f9;
            margin-bottom: 20px;
            box-shadow: var(--card-shadow);
        }

        /* --- [애니메이션 뱃지] --- */
        .badge-live {
            background: rgba(16, 185, 129, 0.1);
            color: #10b981;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 10px;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .badge-live::before {
            content: '';
            width: 6px;
            height: 6px;
            background: #10b981;
            border-radius: 50%;
            animation: pulse-green 2s infinite;
        }

        @keyframes pulse-green {
            0% {
                transform: scale(0.95);
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
            }

            70% {
                transform: scale(1);
                box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
            }

            100% {
                transform: scale(0.95);
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
            }
        }

        .token-timer-bar {
            height: 6px;
            background: #f1f5f9;
            border-radius: 10px;
            overflow: hidden;
            margin-top: 8px;
        }

        .token-timer-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            transition: width 1s linear;
        }

        /* --- [모바일 하단 고정 액션 버튼] --- */
        .bottom-action {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            width: calc(100% - 40px);
            max-width: 440px;
            z-index: 50;
        }


        /* [윤색감] 명도 대비 개선 (WCAG 4.5:1 준수) */
        .post-date,
        .post-status {
            color: #4b5563;
            /* 기존 #6b7280 → 명도 대비 개선 */
        }

        /* [이인터] 버튼 클릭 인터랙션 추가 */
        .btn-primary:active,
        .btn-success:active,
        .btn-danger:active,
        .btn-orange:active,
        .btn-purple:active {
            transform: scale(0.98);
        }

        /* [박리팩] 공통 버튼 스타일 (중복 제거) */
        .btn-base {
            color: white;
            font-weight: 600;
            padding: 14px 24px;
            border-radius: 10px;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
        }


        .search-toggle-container {
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border: 2px solid #0ea5e9;
            border-radius: 12px;
            padding: 14px;
            margin: 10px 0;
        }

        .search-toggle-wrapper {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .search-toggle-title {
            font-weight: 600;
            font-size: 14px;
            color: #0369a1;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .search-toggle-desc {
            font-size: 11px;
            color: #64748b;
            margin-top: 2px;
        }

        .search-badge {
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 9px;
            font-weight: bold;
            background: #dbeafe;
            color: #1e40af;
        }

        .image-toggle-container {
            background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
            border: 2px solid #ec4899;
            border-radius: 12px;
            padding: 14px;
            margin: 10px 0;
        }

        .image-toggle-title {
            font-weight: 600;
            font-size: 14px;
            color: #be185d;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .image-badge {
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 9px;
            font-weight: bold;
            background: #fce7f3;
            color: #be185d;
        }

        .big-toggle {
            position: relative;
            width: 56px;
            height: 28px;
        }

        .big-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .big-toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #cbd5e1;
            transition: 0.4s;
            border-radius: 34px;
        }

        .big-toggle-slider:before {
            position: absolute;
            content: "";
            height: 22px;
            width: 22px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: 0.4s;
            border-radius: 50%;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        .big-toggle input:checked+.big-toggle-slider {
            background-color: #3b82f6;
        }

        .big-toggle input:checked+.big-toggle-slider:before {
            transform: translateX(28px);
        }

        .big-toggle input:checked+.big-toggle-slider.pink {
            background-color: #ec4899;
        }

        .search-status-indicator {
            margin-top: 8px;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .search-status-on {
            background-color: #dcfce7;
            color: #166534;
            border: 1px solid #86efac;
        }

        .search-status-off {
            background-color: #fef3c7;
            color: #92400e;
            border: 1px solid #fde68a;
        }

        .button-text-input {
            width: 100%;
            padding: 8px 12px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 13px;
            margin-top: 6px;
        }

        .button-text-input:focus {
            outline: none;
            border-color: #ef4444;
        }

        .button-edit-section {
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 10px;
            padding: 12px;
            margin: 8px 0;
        }

        .button-edit-label {
            font-size: 12px;
            font-weight: 600;
            color: #991b1b;
            margin-bottom: 2px;
        }

        .auto-refresh-badge {
            background: #22c55e;
            color: white;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: bold;
        }

        .auto-refresh-badge.active {
            animation: pulse 2s infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.7;
            }
        }

        .bulk-title-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            margin: 6px 0;
        }

        .bulk-title-item .num {
            background: #3b82f6;
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            flex-shrink: 0;
        }

        .bulk-title-item .title-text {
            flex: 1;
            font-size: 13px;
            color: #374151;
        }

        .bulk-title-item .status {
            font-size: 11px;
            padding: 3px 8px;
            border-radius: 6px;
        }

        .bulk-title-item .status.pending {
            background: #fef3c7;
            color: #92400e;
        }

        .bulk-title-item .status.processing {
            background: #dbeafe;
            color: #1e40af;
        }

        .bulk-title-item .status.done {
            background: #dcfce7;
            color: #166534;
        }

        .bulk-title-item .status.error {
            background: #fee2e2;
            color: #991b1b;
        }

        .bulk-title-item .remove-btn {
            background: #ef4444;
            color: white;
            border: none;
            width: 24px;
            height: 24px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
        }

        .date-picker-wrapper {
            position: relative;
        }

        .date-picker-wrapper input {
            cursor: pointer;
        }

        .quick-date-btns {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            margin-top: 8px;
        }

        .quick-date-btn {
            background: #e5e7eb;
            border: none;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .quick-date-btn:hover {
            background: #3b82f6;
            color: white;
        }

        .bulk-schedule-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin: 10px 0;
        }

        .bulk-schedule-item {
            background: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 10px;
        }

        .bulk-schedule-item label {
            font-size: 11px;
            color: #6b7280;
            display: block;
            margin-bottom: 4px;
        }

        .bulk-schedule-item input,
        .bulk-schedule-item select {
            width: 100%;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            padding: 6px;
            font-size: 13px;
        }

        /* --- [블로그 선택 모달 스타일 추가] --- */
        .blog-selection-modal {
            position: fixed;
            inset: 0;
            z-index: 100;
            visibility: hidden;
            pointer-events: none;
            transition: all 0.3s ease;
        }

        .blog-selection-modal.active {
            visibility: visible;
            pointer-events: auto;
        }

        .modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(4px);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .blog-selection-modal.active .modal-backdrop {
            opacity: 1;
        }

        .blog-modal-content {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: white;
            border-radius: 30px 30px 0 0;
            transform: translateY(100%);
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            max-width: 480px;
            margin: 0 auto;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
        }

        .blog-selection-modal.active .blog-modal-content {
            transform: translateY(0);
        }

        /* --- [블로그 선택 모달 기본 상태 숨김] --- */
        .blog-selection-modal {
            position: fixed;
            inset: 0;
            z-index: 100;
            visibility: hidden;
            pointer-events: none;
            transition: all 0.3s ease;
        }

        .blog-selection-modal.active {
            visibility: visible;
            pointer-events: auto;
        }

        .modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(4px);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .blog-selection-modal.active .modal-backdrop {
            opacity: 1;
        }

        .blog-modal-content {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: white;
            border-radius: 30px 30px 0 0;
            transform: translateY(100%);
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            max-width: 480px;
            margin: 0 auto;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
        }

        .token-status-container {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 12px;
            margin-top: 8px;
        }

        .token-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .token-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .token-label {
            font-size: 12px;
            opacity: 0.9;
        }

        .token-time {
            font-size: 18px;
            font-weight: bold;
            font-variant-numeric: tabular-nums;
        }

        .auto-badge {
            background: #22c55e;
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .auto-badge.refreshing {
            animation: pulse 1s infinite;
            background: #f59e0b;
        }

        .token-progress-wrap {
            width: 100%;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            height: 6px;
            overflow: hidden;
        }

        .token-progress-inner {
            height: 100%;
            background: white;
            border-radius: 10px;
            transition: width 1s linear;
        }

        .token-progress-inner.warning {
            background: #fbbf24;
        }

        .token-progress-inner.danger {
            background: #ef4444;
        }

        .image-count-selector {
            display: flex;
            gap: 8px;
            margin-top: 8px;
        }

        .image-count-btn {
            padding: 8px 16px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            background: white;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.2s;
        }

        .image-count-btn:hover {
            border-color: #ec4899;
        }

        .image-count-btn.active {
            border-color: #ec4899;
            background: #fdf2f8;
            color: #be185d;
            font-weight: 600;
        }

        .image-preview-container {
            background: #f9fafb;
            border: 2px dashed #e5e7eb;
            border-radius: 12px;
            padding: 20px;
            margin: 10px 0;
            text-align: center;
        }

        .image-preview-container img {
            max-width: 100%;
            border-radius: 8px;
            margin: 10px 0;
        }
