:root {
    --bg-color: #121212;
    --panel-bg: #222222;
    --text-main: #f0f0f0;
    --text-muted: #9e9e9e;
    --border-color: #333333;
    --primary-color: #FF6A1C;
    --primary-hover: #d1446c;
    --secondary-color: #5432DE;
    --btn-red: #FF6A1C;
    --btn-yellow: #ffc107;
    --btn-green: #4caf50;
    --btn-gray: #607d8b;
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.full-width { width: 100%; }

.text-orange { color: var(--primary-color); }
.text-blue { color: var(--secondary-color); }
.text-pink { color: #FF6A1C; }
.text-green { color: #4caf50; }
.text-teal { color: #00bcd4; font-weight: 500; cursor: pointer; }

/* Top Navbar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-icon-wrapper {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
    transform: rotate(-3deg);
    transition: all 0.3s ease;
}

.logo:hover .logo-icon-wrapper {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.5);
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-bold {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
}

.logo-sub {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #fff;
    text-transform: uppercase;
    margin-top: 2px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 20px;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    width: 400px;
    background-color: var(--panel-bg);
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 600;
}

/* Controls */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.info-icon {
    font-size: 12px;
    color: #555;
    margin-left: 5px;
    cursor: pointer;
}

.custom-select, .custom-input {
    width: 100%;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 14px;
    outline: none;
    transition: border 0.3s;
}

.custom-select:focus, .custom-input:focus {
    border-color: var(--primary-color);
}

/* Sliders */
.slider-group .slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.custom-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #444;
    outline: none;
    margin-top: 5px;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid #fff;
}

.orange-fill-slider::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(255,87,34,0.5);
}

/* Tabs inside sidebar */
.tabs {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    padding-bottom: 0;
}

.tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    padding: 0 5px 10px 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: #fff;
}

.tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Toggles */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-group label:first-child {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider.round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 34px;
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider.round {
    background-color: var(--primary-color);
}

input:checked + .slider.round:before {
    transform: translateX(16px);
}

/* Advance Title & Theme */
.advance-title {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.advance-title label {
    color: var(--text-muted);
}

.expand-text {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
}

.theme-color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.color-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* Main Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.panel h2 {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Platform Tabs */
.platform-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.platform-tab {
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.platform-tab.active, .platform-tab:hover {
    border-color: var(--primary-color);
    color: var(--text-main);
}

.platform-tab.active i {
    color: var(--primary-color);
}

/* Dropzone */
.dropzone {
    border: 1px dashed #555;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background-color: #1f1f1f;
    transition: border 0.3s, background-color 0.3s;
    cursor: pointer;
    position: relative;
}

.dropzone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(255, 87, 34, 0.05);
}

.dropzone-content .upload-types-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.dropzone-content .upload-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dropzone-content .upload-type i {
    font-size: 28px;
}

.dropzone-content .upload-type span {
    font-size: 13px;
    font-weight: 700;
}

.dropzone-content p {
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 5px;
}

.supported-formats {
    font-size: 11px !important;
    color: var(--text-muted) !important;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.3s, transform 0.1s;
    color: #fff;
}

.btn:active {
    transform: scale(0.98);
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary { background-color: var(--primary-color); }
.btn-red { background-color: var(--btn-red); }
.btn-yellow { background-color: var(--btn-yellow); color: #000; }
.btn-green { background-color: var(--btn-green); }
.btn-gray { background-color: var(--btn-gray); }

.btn-outline-small {
    background: transparent;
    border: 1px solid #555;
    color: var(--text-muted);
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
}

.btn-outline-small:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

/* Generated Metadata List */
.generated-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.generated-list {
    flex: 1;
    border: 1px dashed #444;
    border-radius: 4px;
    padding: 20px;
    background-color: #1c1c1c;
    overflow-y: auto;
    min-height: 150px;
}

.placeholder-text {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-top: 40px;
}

.metadata-item {
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-color);
}

.metadata-item h3 {
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--text-main);
}

.metadata-item p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.metadata-item .keywords-pill {
    display: inline-block;
    background-color: #333;
    color: #ddd;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.api-modal-container {
    display: flex;
    width: 750px;
    background-color: #121212;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.api-modal-sidebar {
    width: 220px;
    background-color: #171717;
    border-right: 1px solid #2a2a2a;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
}

.api-modal-sidebar-title {
    font-size: 11px;
    color: #666;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.api-modal-provider {
    padding: 12px 15px;
    border-radius: 8px;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.api-modal-provider.active {
    background-color: #222;
    color: #fff;
}

.api-modal-provider:hover:not(.active) {
    background-color: #1e1e1e;
    color: #ccc;
}

.api-modal-main {
    flex: 1;
    padding: 35px 45px;
    background-color: #121212;
    position: relative;
}

.api-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.api-modal-label {
    display: block;
    font-size: 11px;
    color: #888;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.api-modal-select {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 14px 15px;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    appearance: none;
    transition: border 0.3s;
}

.api-modal-select:focus {
    border-color: #666;
}

.api-modal-input {
    flex: 1;
    background-color: #fff;
    border: none;
    color: #000;
    padding: 14px 15px;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 16px;
    outline: none;
}

.api-modal-save-btn {
    width: 52px;
    background-color: #a8b2c1;
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.api-modal-save-btn:hover {
    background-color: #8fa1b9;
}

.api-modal-section {
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.key-slot {
    width: 60px;
    height: 60px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #444;
    cursor: pointer;
    transition: all 0.2s;
}

.key-slot.active {
    border: 1px dashed #666;
    background-color: rgba(255, 255, 255, 0.03);
    color: #ccc;
}

.key-slot.filled {
    border: 1px solid #444;
    color: #6a9ce0;
}

.key-slot:hover {
    background-color: #1a1a1a;
}

.api-modal-slot-display {
    border: 1px dashed #2a2a2a;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 13px;
    text-align: center;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #666;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: white;
}

/* File Previews */
.file-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.file-preview-item {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .file-icon {
    font-size: 32px;
    color: var(--text-muted);
}

.remove-file-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(244, 67, 54, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: transform 0.2s;
}

.remove-file-btn:hover {
    transform: scale(1.1);
}

/* Count System */
.count-system {
    display: flex;
    align-items: center;
    background-color: #111418;
    border-radius: 30px;
    padding: 6px 18px;
    border: 1px solid #1a1e24;
}
.count-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
}
.count-number {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}
.count-label {
    font-size: 9px;
    font-weight: 600;
    color: #5c6a81;
    letter-spacing: 1px;
    margin-top: 2px;
}
.count-divider {
    width: 1px;
    height: 28px;
    background-color: #242933;
    margin: 0 12px;
}

/* Footer */
.app-footer {
    background-color: var(--panel-bg);
    border-top: 1px solid var(--border-color);
    padding: 12px 30px;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.developer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.developer-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}
