:root {
    --primary-color: #006233;
    --primary-hover: #004d28;
    --primary-light: #d1fae5;
    --background-light: #ffffff;
    --background-dark: #111827;
    --text-light: #1f2937;
    --text-dark: #f3f4f6;
    --border-light: #e5e7eb;
    --border-dark: #374151;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-dark: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
    --header-height: 70px;
    --btn-email: #006233;
    --btn-phone: #006233;
    --btn-link: #374151;
    --btn-telegram: #006233;
    --btn-whatsapp: #006233;
    --btn-search: #374151;
    --btn-nav: #374151;
    --btn-edit: #374151;
    --btn-clipboard: #006233;
    --btn-save: #006233;
    --btn-delete: #D21034;
    --btn-clear: #D21034;
    --btn-transform: #374151;
    --btn-sort: #374151;
    --btn-template: #006233;
    --btn-success: #006233;
    --btn-primary: #006233;
    --btn-danger: #D21034;
    --transition-fast: 0.15s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-bg-dark: rgba(31, 41, 55, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.dark {
    --primary-color: #10b981;
    --primary-hover: #006233;
    --primary-light: #064e3b;
    --background-light: #1f2937;
    --background-dark: #111827;
    --text-light: #f3f4f6;
    --text-dark: #f3f4f6;
    --border-light: #374151;
    --border-dark: #4b5563;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.18);
    --glass-bg: rgba(31, 41, 55, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: var(--background-light);
    color: var(--text-light);
    transition: all var(--transition-normal) ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--header-height);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

header {
    background-color: var(--primary-color);
    box-shadow: var(--shadow-light);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: all var(--transition-normal) ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-title {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInDown 0.5s ease forwards 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform var(--transition-normal) ease;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInDown 0.5s ease forwards;
}

.logo:hover { transform: scale(1.05); }

.logo img {
    height: 46px;
    width: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.side-menu {
    position: fixed;
    right: -100%;
    top: 0;
    width: 300px;
    height: 100vh;
    background-color: var(--background-light);
    box-shadow: var(--shadow-light);
    transition: right var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
    padding: calc(var(--header-height) + 1rem) 1.5rem 1.5rem 1.5rem;
}

.side-menu.active { right: 0; }

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.menu-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.menu-items { list-style: none; }
.menu-item { margin-bottom: 0.5rem; }

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.9rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition-normal) ease;
    border-radius: 0.5rem;
    font-weight: 500;
}

.menu-link:hover {
    background-color: var(--border-light);
    transform: translateX(-4px);
}

.menu-link.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(-4px);
}

.menu-link i {
    margin-left: 0.75rem;
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
}

.menu-close {
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal) ease;
    padding: 0;
}

.menu-close:hover {
    background-color: var(--primary-hover);
    transform: rotate(90deg) scale(1.1);
}

footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color), var(--primary-light));
}

.notification {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    right: 20px;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-light);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification.success { background-color: var(--btn-success); }
.notification.error { background-color: var(--btn-danger); }
.notification.show { transform: translateX(0); }

.tool-container {
    display: none;
    animation: fadeIn var(--transition-normal) ease;
}

.tool-container.active { display: block; }

/* Views Navigation */
.views-nav {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.views-nav::-webkit-scrollbar { display: none; }

.view-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: var(--background-light);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.view-nav-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.view-nav-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 98, 51, 0.15);
}

.view-nav-btn:hover i {
    transform: scale(1.1);
}

.view-nav-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 98, 51, 0.3);
}

.dark .view-nav-btn {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

.dark .view-nav-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.dark .view-nav-btn.active {
    background: #10b981;
    color: #111827;
    border-color: #10b981;
}

/* View Panels */
.view-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@media (max-width: 768px) {
    .views-nav {
        gap: 0.4rem;
        padding: 0.75rem 0;
    }

    .view-nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        border-radius: 10px;
    }

    .view-nav-btn span {
        display: none;
    }

    .view-nav-btn i {
        font-size: 1.1rem;
    }
}

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

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

.editor-container {
    background: var(--background-light);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal) ease;
}

.editor-container:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 98, 51, 0.03) 0%, rgba(0, 98, 51, 0.06) 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 98, 51, 0.08);
}

.dark .toolbar {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(16, 185, 129, 0.06) 100%);
    border-color: rgba(16, 185, 129, 0.1);
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.7;
    resize: vertical;
    transition: all var(--transition-normal) ease;
    background-color: var(--background-light);
    color: var(--text-light);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.1rem;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="text"],
input[type="number"],
select {
    padding: 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all var(--transition-normal) ease;
    background-color: var(--background-light);
    color: var(--text-light);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-light);
    display: none;
    z-index: 1000;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-icon i {
    font-size: 0.85rem;
    opacity: 0.9;
}

.btn-email { background-color: var(--btn-email); color: white !important; }
.btn-phone { background-color: var(--btn-phone); color: white !important; }
.btn-link { background-color: var(--btn-link); color: white !important; }
.btn-nav { background-color: var(--btn-nav); color: white !important; }
.btn-clear { background-color: var(--btn-clear); color: white !important; }
.btn-transform { background-color: var(--btn-transform); color: white !important; }
.btn-sort { background-color: var(--btn-sort); color: white !important; }
.btn-template { background-color: var(--btn-template); color: white !important; }
.btn-primary { background-color: var(--btn-primary); color: white !important; }
.btn-success { background-color: var(--btn-success); color: white !important; }
.btn-danger { background-color: var(--btn-danger); color: white !important; }

.btn-email:hover { background-color: #004d28; box-shadow: 0 6px 16px rgba(0, 98, 51, 0.3); }
.btn-phone:hover { background-color: #004d28; box-shadow: 0 6px 16px rgba(0, 98, 51, 0.3); }
.btn-link:hover { background-color: #1f2937; box-shadow: 0 6px 16px rgba(55, 65, 81, 0.3); }
.btn-nav:hover { background-color: #1f2937; box-shadow: 0 6px 16px rgba(55, 65, 81, 0.3); }
.btn-clear:hover { background-color: #a80d2a; box-shadow: 0 6px 16px rgba(210, 16, 52, 0.3); }
.btn-transform:hover { background-color: #1f2937; box-shadow: 0 6px 16px rgba(55, 65, 81, 0.3); }
.btn-sort:hover { background-color: #1f2937; box-shadow: 0 6px 16px rgba(55, 65, 81, 0.3); }
.btn-template:hover { background-color: #004d28; box-shadow: 0 6px 16px rgba(0, 98, 51, 0.3); }
.btn-primary:hover { background-color: #004d28; box-shadow: 0 6px 16px rgba(0, 98, 51, 0.3); }
.btn-success:hover { background-color: #004d28; box-shadow: 0 6px 16px rgba(0, 98, 51, 0.3); }
.btn-danger:hover { background-color: #a80d2a; box-shadow: 0 6px 16px rgba(210, 16, 52, 0.3); }

.input-group { margin-bottom: 1.25rem; }

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 1.5rem 0;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    margin-top: 10px;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.tool-header {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary-color);
    font-weight: bold;
    position: relative;
    padding-bottom: 0.75rem;
}

.tool-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.theme-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    border: none;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-normal) ease;
}

.theme-toggle:hover { transform: rotate(30deg) scale(1.1); }
.theme-toggle i { font-size: 1.25rem; }

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25% 15%, rgba(4, 120, 87, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 75% 85%, rgba(4, 120, 87, 0.05) 0%, transparent 25%);
    pointer-events: none;
    z-index: -1;
}

.dark .bg-pattern {
    background-image:
        radial-gradient(circle at 25% 15%, rgba(16, 185, 129, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 75% 85%, rgba(16, 185, 129, 0.1) 0%, transparent 25%);
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity var(--transition-normal) ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* AI Tool Styles */
.ai-status-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--border-light);
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.ai-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.ai-status-ready { background-color: #10b981; }
.ai-status-working { background-color: #f59e0b; animation: pulse 1s infinite; }
.ai-status-error { background-color: #ef4444; }

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

.ai-key-info {
    margin-right: auto;
    font-size: 0.8rem;
    color: #6b7280;
}

.ai-quick-actions {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background-color: rgba(4, 120, 87, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(4, 120, 87, 0.15);
}

.ai-quick-actions h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.media-upload-status {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    animation: fadeIn 0.3s ease;
}

.section-description {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.ugc-media-upload-area {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 2px dashed var(--border-light);
    border-radius: 10px;
    background: rgba(4, 120, 87, 0.02);
    transition: all 0.3s ease;
}

.ugc-media-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(4, 120, 87, 0.05);
}

.ugc-upload-btn {
    width: 100%;
    padding: 1rem !important;
    font-size: 0.95rem !important;
    justify-content: center;
    border-style: dashed;
    background-color: var(--border-light) !important;
    color: var(--text-light) !important;
}

.ugc-upload-btn:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-style: solid;
}

.ugc-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.ugc-media-preview:empty {
    display: none;
}

.ugc-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.ugc-preview-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.ugc-preview-item img,
.ugc-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ugc-preview-item .remove-media {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(210, 16, 52, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ugc-preview-item:hover .remove-media {
    opacity: 1;
}

.smart-export-buttons {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 98, 51, 0.04) 0%, rgba(0, 98, 51, 0.08) 100%);
    border-radius: 10px;
    border: 1px solid rgba(0, 98, 51, 0.12);
    animation: fadeIn 0.3s ease;
}

.smart-export-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark .smart-export-buttons {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(16, 185, 129, 0.08) 100%);
    border-color: rgba(16, 185, 129, 0.15);
}

.article-generator-section {
    border: 1px solid rgba(0, 98, 51, 0.2);
    background: linear-gradient(135deg, rgba(0, 98, 51, 0.02) 0%, rgba(0, 98, 51, 0.06) 100%);
}

.article-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-form-row {
    display: flex;
    gap: 1rem;
}

.article-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.article-field-small {
    flex: 0.4;
    min-width: 120px;
}

.article-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.article-field input,
.article-field select {
    padding: 0.65rem 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: var(--background-light);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.article-field input:focus,
.article-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

@media (max-width: 768px) {
    .article-form-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .article-field-small {
        flex: 1;
    }
}

.article-images-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-image-block {
    padding: 0.75rem;
    background: var(--background-light);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.article-image-block > label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.ugc-media-upload-area.compact {
    padding: 0.5rem;
    margin-bottom: 0;
    border: 1px dashed var(--border-light);
}

.compact-btn {
    padding: 0.6rem !important;
    font-size: 0.85rem !important;
}

.article-extra-images {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.article-extra-image-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.article-extra-image-item input[type="text"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--background-light);
    color: var(--text-light);
}

.article-extra-image-item input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.extra-img-status {
    min-width: 20px;
    display: flex;
    align-items: center;
}

.article-field textarea {
    padding: 0.65rem 0.75rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: var(--background-light);
    color: var(--text-light);
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s ease;
}

.article-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.article-search-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 98, 51, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 98, 51, 0.15);
    flex-wrap: wrap;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

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

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

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color);
}

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

.toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

.toggle-hint {
    font-size: 0.75rem;
    color: #6b7280;
    width: 100%;
    padding-right: 3.5rem;
}

/* Progress Indicator */
.ai-progress-container {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(0,98,51,0.04) 0%, rgba(0,98,51,0.08) 100%);
    border: 1px solid rgba(0,98,51,0.15);
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

.ai-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ai-progress-header > span:first-child {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
}

.ai-progress-time {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

.ai-progress-bar-wrapper {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: 6px;
    overflow: hidden;
}

.ai-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #10b981 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.ai-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ai-progress-step {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Settings Styles */
.settings-section {
    margin-bottom: 1.5rem;
}

.settings-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.api-keys-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.api-key-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--border-light);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.api-key-item:hover {
    border-color: var(--primary-color);
}

.api-key-item .key-number {
    background-color: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.api-key-item .key-value {
    flex: 1;
    font-family: monospace;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-light);
}

.api-key-item .key-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.key-status-active {
    background-color: #d1fae5;
    color: #047857;
}

.key-status-inactive {
    background-color: #fef3c7;
    color: #92400e;
}

.key-status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

.api-key-item .key-delete {
    background-color: var(--btn-danger);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.api-key-item .key-delete:hover {
    background-color: #dc2626;
}

.add-key-section-bulk {
    margin-bottom: 1rem;
}

.add-key-section-bulk label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.add-key-section-bulk textarea {
    min-height: 120px;
    margin-bottom: 0.75rem;
    font-family: monospace;
    font-size: 0.9rem;
    direction: ltr;
    text-align: left;
}

.api-test-results {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
}

.api-test-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.api-test-item .test-icon { font-size: 1rem; }
.test-success { color: #10b981; }
.test-fail { color: #ef4444; }

/* Responsive */
@media (max-width: 768px) {
    :root { --header-height: 60px; }
    .container { padding: 1rem; }
    .header-content { padding: 0 1rem; }
    .header-title { font-size: 1.1rem; }
    .logo img { height: 36px; }
    .editor-container { padding: 1.25rem; border-radius: 10px; }

    textarea { min-height: 180px; font-size: 16px; padding: 0.9rem; line-height: 1.5; }

    .toolbar {
        gap: 0.4rem;
        padding: 0.75rem;
    }

    .toolbar button { flex: 0 1 auto; min-width: fit-content; font-size: 0.8rem; padding: 0.55rem 0.7rem; }

    .side-menu { right: -100%; width: 85%; max-width: 300px; }
    .side-menu.active { right: 0; }

    .btn-group { flex-direction: column; }
    .btn-group button { width: 100%; }

    .theme-toggle { bottom: 20px; left: 20px; width: 45px; height: 45px; }
}

@media (max-width: 380px) {
    .header-title { font-size: 0.9rem; max-width: 180px; }
    .editor-container { padding: 1rem; }
    button { padding: 0.9rem 0.75rem; font-size: 0.9rem; }
    .theme-toggle { width: 40px; height: 40px; }
}
