:root {
    /* Core Palette */
    --primary-color: #1bd96a;
    --background-color: #121212;
    --section-bg-color: #1e1e1e;
    --prominent-text-color: #e0e0e0;
    --general-text-color: #c9c9c9;
    --subtle-text-color: #888888;

    /* Shadows & Glows */
    --card-shadow: 0 8px 15px rgba(0, 0, 0, 0.25);
    --card-hover-darker: rgba(0, 0, 0, 0.2);
    --section-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --btn-shadow-color: rgba(27, 217, 106, 0.3);
    --btn-hover-shadow-color: rgba(27, 217, 106, 0.4);

    /* Inputs */
    --input-bg: #2a2a2a;
    --input-border: #444;
    --input-focus-shadow: rgba(27, 217, 106, 0.35);

    /* Editor Specific */
    --surface-color: #1e1e1e;
    --surface-hover: #2a2a2a;
    --secondary-color: #ff6b6b;
    --text-muted: #aaa;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--general-text-color);
}

.form-section {
    background-color: var(--section-bg-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--section-shadow);
}

.form-section h2 {
    color: var(--prominent-text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 0.75rem;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.125rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.form-input,
.form-textarea,
.form-file-input {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--general-text-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all 0.2s ease-in-out;
}

.form-file-input {
    padding: 0;
}

.form-file-input::-webkit-file-upload-button {
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    padding: 0.75rem 1rem;
    border-right: 1px solid var(--input-border);
    cursor: pointer;
}


.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--input-focus-shadow);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--prominent-text-color);
}

.label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 10px var(--btn-shadow-color);
}

.btn-primary:hover {
    box-shadow: 0 6px 15px var(--btn-hover-shadow-color);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background-color: var(--subtle-text-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: rgba(27, 217, 106, 0.1);
}

.btn-danger {
    background-color: transparent;
    color: #ff4d4d;
    border: 1px solid #ff4d4d;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-danger:hover {
    background-color: rgba(255, 77, 77, 0.1);
}

.btn-link {
    background: none;
    border: none;
    color: var(--subtle-text-color);
    text-decoration: underline;
    padding: 0;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-link:hover {
    color: var(--primary-color);
}

.dynamic-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.dynamic-list-item input,
.dynamic-list-item textarea {
    flex-grow: 1;
}

.package {
    border: 1px solid var(--input-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-top: 1rem;
}

#jsonOutput {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 0.5rem;
    padding: 1rem;
    max-height: 800px;
    overflow-y: auto;
    color: var(--prominent-text-color);
}

.code-highlight {
    color: var(--primary-color);
}

.image-preview {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 0.25rem;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
}

/* Drag and Drop Screenshot Styles */
#screenshots-list .screenshot-item {
    cursor: grab;
    background-color: var(--input-bg);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

#screenshots-list .screenshot-item.dragging {
    opacity: 0.5;
    background: var(--primary-color);
}

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* EDITOR STYLES (from provided HTML) */
.editor-container * {
    box-sizing: border-box;
}

.editor-container {
    font-family: 'Poppins', sans-serif;
}

.editor-container .header {
    text-align: center;
    margin-bottom: 40px;
}

.editor-container .header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.editor-container .header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 10px;
}

.editor-container .tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.editor-container .tab-buttons {
    display: flex;
    background: var(--surface-color);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid var(--input-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.editor-container .tab-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.editor-container .tab-btn.active {
    background-color: var(--primary-color);
    color: #121212;
    box-shadow: 0 4px 15px var(--btn-shadow-color);
}

.editor-container .tab-btn:not(.active):hover {
    background: var(--surface-hover);
    color: var(--prominent-text-color);
}

.editor-container .editor-content {
    display: none;
}

.editor-container .editor-content.active {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.editor-container .controls,
.editor-container .preview-area {
    background: var(--surface-color);
    border-radius: 16px;
    border: 1px solid var(--input-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.editor-container .controls::before,
.editor-container .preview-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.editor-container .controls {
    width: 380px;
    padding: 30px;
}

.editor-container .preview-area {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.editor-container h2 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.editor-container .instructions {
    background: rgba(27, 217, 106, 0.1);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(27, 217, 106, 0.2);
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
}

.editor-container .control-group {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-container .control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--prominent-text-color);
    font-size: 0.95rem;
}

.editor-container .control-group>label:first-child {
    color: var(--primary-color);
    font-size: 1rem;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.editor-container input[type="file"] {
    width: 100%;
    padding: 12px;
    background: var(--surface-hover);
    border: 2px dashed var(--input-border);
    border-radius: 8px;
    color: var(--prominent-text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.editor-container input[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(27, 217, 106, 0.05);
}

.editor-container .slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.editor-container .slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-container .slider-group label {
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0;
}

.editor-container .slider-group .value-input {
    font-family: 'Courier New', monospace;
    background: var(--primary-color);
    color: #121212;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    border: none;
    outline: none;
    min-width: 40px;
    max-width: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.editor-container .slider-group .value-input:hover {
    background: #20e876;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(27, 217, 106, 0.3);
}

.editor-container .slider-group .value-input:focus {
    background: #20e876;
    box-shadow: 0 0 0 2px rgba(27, 217, 106, 0.4);
    transform: scale(1.05);
}

.editor-container input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #555;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.editor-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(27, 217, 106, 0.3);
    transition: all 0.2s ease;
}

.editor-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(27, 217, 106, 0.5);
}

.editor-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(27, 217, 106, 0.3);
}

.editor-container .editor-controls {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.editor-container .button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.editor-container button {
    flex-grow: 1;
    padding: 14px 20px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.editor-container button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.editor-container button:hover::before {
    left: 100%;
}

.editor-container .save-btn {
    background-color: var(--primary-color);
    color: #121212;
    box-shadow: 0 4px 15px rgba(27, 217, 106, 0.3);
}

.editor-container .save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 217, 106, 0.4);
}

.editor-container .reset-btn {
    background: linear-gradient(135deg, var(--secondary-color), #ff8a80);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.editor-container .reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.editor-container canvas {
    background: #222;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--input-border);
    transition: all 0.3s ease;
}

.editor-container canvas:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(27, 217, 106, 0.2);
}

.editor-container .quality-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 15px;
    padding: 10px;
    background: rgba(27, 217, 106, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(27, 217, 106, 0.1);
    text-align: center;
}

.editor-container .canvas-info {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(27, 217, 106, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(27, 217, 106, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: var(--primary-color);
}

@media (max-width: 1200px) {
    .editor-container .editor-content.active {
        flex-direction: column;
        align-items: center;
    }

    .editor-container .controls {
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .editor-container .tab-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .editor-container .tab-btn {
        font-size: 0.85rem;
        padding: 10px 16px;
    }

    .editor-container .header h1 {
        font-size: 2rem;
    }
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--section-bg-color);
    border: 1px solid var(--input-border);
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
    z-index: 1001;
    animation: fadeIn 0.3s ease, slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -45%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--input-border);
}

.modal-title {
    color: var(--prominent-text-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--subtle-text-color);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--prominent-text-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin-bottom: 1rem;
    color: var(--general-text-color);
}

.modal-body textarea {
    height: 300px;
    resize: vertical;
}

.modal-footer {
    padding: 1rem 1.5rem;
    text-align: right;
    border-top: 1px solid var(--input-border);
}

.modal-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.25rem;
}

#paste-preview-area {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: .5rem;
    padding: 1rem;
    color: var(--general-text-color);
}