/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(to bottom right, #faf5ff, #eff6ff);
    min-height: 100vh;
    padding: 1.5rem;
    color: #374151;
}

/* Container */
.container {
    max-width: 1536px;
    margin: 0 auto;
}

/* Typography */
.main-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #7c3aed;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.section-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #7c3aed;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 0.75rem;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* Panels */
.panel {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Form Elements */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #7c3aed;
    ring: 2px;
    ring-color: #7c3aed;
}

/* Parameter Sections */
.parameter-section {
    padding-top: 1rem;
    border-top: 2px solid #e9d5ff;
}

.parameter-section .form-group {
    margin-top: 0.75rem;
}

/* Checkboxes */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background: #f9fafb;
}

.color-grid {
    grid-template-columns: repeat(3, 1fr);
    max-height: 12rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    border-radius: 0.25rem;
    color: #7c3aed;
    cursor: pointer;
}

.checkbox-item span {
    cursor: pointer;
}

/* Aspect Ratio Box */
.aspect-ratio-box {
    background: #dbeafe;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #3b82f6;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    border-radius: 0.25rem;
    color: #7c3aed;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.helper-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    margin-left: 1.5rem;
}

/* Buttons */
.btn-generate {
    width: 100%;
    background: #7c3aed;
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.15s;
}

.btn-generate:hover {
    background: #6d28d9;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    flex: 1;
}

.btn-copy {
    background: #2563eb;
    color: white;
}

.btn-copy:hover {
    background: #1d4ed8;
}

.btn-save {
    background: #16a34a;
    color: white;
}

.btn-save:hover {
    background: #15803d;
}

.btn-small {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #6b7280;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-small:hover {
    background: #4b5563;
}

.btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1rem;
}

/* Output Section */
.output-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.generated-text {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    min-height: 6rem;
    color: #1f2937;
    line-height: 1.6;
}

.button-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.category-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.category-select:focus {
    outline: none;
    border-color: #7c3aed;
    ring: 2px;
    ring-color: #7c3aed;
}

/* Library */
.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.library-buttons {
    display: flex;
    gap: 0.5rem;
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 0.625rem;
    color: #9ca3af;
    font-size: 1.125rem;
}

.search-container input {
    width: 100%;
    padding-left: 2.5rem;
    padding-right: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}

.search-container input:focus {
    outline: none;
    border-color: #7c3aed;
    ring: 2px;
    ring-color: #7c3aed;
}

/* Styles Container */
.styles-container {
    max-height: 24rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.empty-message {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
}

/* Category Section */
.category-section {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    overflow: hidden;
}

.category-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.category-header:hover {
    background: #e5e7eb;
}

.category-header span {
    font-weight: 600;
    color: #374151;
}

.chevron {
    font-size: 1.125rem;
}

.category-content {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Style Item */
.style-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 0.375rem;
    transition: background 0.15s;
}

.style-item:hover {
    background: #f3f4f6;
}

.style-content {
    flex: 1;
    cursor: pointer;
}

.style-title {
    font-weight: 500;
    color: #7c3aed;
    margin-bottom: 0.25rem;
}

.style-description {
    font-size: 0.875rem;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.delete-btn {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: color 0.15s;
}

.delete-btn:hover {
    color: #991b1b;
}

/* Scrollbar Styling */
.checkbox-grid::-webkit-scrollbar,
.styles-container::-webkit-scrollbar {
    width: 8px;
}

.checkbox-grid::-webkit-scrollbar-track,
.styles-container::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.checkbox-grid::-webkit-scrollbar-thumb,
.styles-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.checkbox-grid::-webkit-scrollbar-thumb:hover,
.styles-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}




