
/* Base styles from the background pattern */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    color: white;
    overflow-x: hidden;
    line-height: 1.6;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Background Effects */
.particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    opacity: 0.7;
    animation: float 6s ease-in-out infinite;
}

.particle-1 { width: 8px; height: 8px; top: 20%; left: 20%; animation-delay: 0s; }
.particle-2 { width: 12px; height: 12px; top: 40%; right: 32%; animation-delay: 1s; }
.particle-3 { width: 4px; height: 4px; top: 60%; left: 33%; animation-delay: 2s; }
.particle-4 { width: 8px; height: 8px; bottom: 40%; right: 20%; animation-delay: 3s; }
.particle-5 { width: 4px; height: 4px; bottom: 20%; left: 25%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 50%, rgba(15, 23, 42, 0.9) 100%);
    z-index: -1;
}

.gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #a855f7 50%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Application Layout */
.app-container {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 1px;
    background: rgba(255, 255, 255, 0.05);
}

/* Sidebar */
.sidebar {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

/* Form Controls */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.color-input {
    height: 40px;
    padding: 4px;
    cursor: pointer;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(71, 85, 105, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(71, 85, 105, 1);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Menu Items List */
.menu-items-list {
    max-height: 300px;
    overflow-y: auto;
}

.menu-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item:hover {
    border-color: #6366f1;
    background: rgba(15, 23, 42, 0.8);
}

.menu-item.active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.menu-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-item-icon {
    width: 20px;
    text-align: center;
}

.menu-item-text {
    flex: 1;
    font-weight: 500;
}

.menu-item-actions {
    display: flex;
    gap: 0.5rem;
}

.menu-item-actions button {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.menu-item-actions button:hover {
    color: white;
}

/* Preview Area */
.preview-area {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-btn {
    background: rgba(71, 85, 105, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-btn.active,
.preview-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    color: white;
    border-color: #6366f1;
}

.preview-container {
    flex: 1;
    padding: 2rem;
    overflow: auto;
}

/* Generated Menu Styles */
.generated-menu {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 8px;
    padding: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.menu-title {
    margin-bottom: 1rem;
}

.menu-title.left {
    margin-right: auto;
}

.menu-title.center {
    margin: 0 auto 1rem auto;
    justify-content: center;
}

.menu-title.right {
    margin-left: auto;
}

.generated-menu.vertical {
    flex-direction: column;
    align-items: stretch;
    width: fit-content;
    min-width: 200px;
}

.generated-menu.dropdown {
    position: relative;
}

.menu-item-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.menu-item-preview:hover {
    transform: translateY(-1px);
}

/* Properties Panel */
.properties-panel {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    overflow-y: auto;
}

.properties-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Icon Picker */
.icon-picker {
    position: relative;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(71, 85, 105, 0.4);
}

.icon-option:hover {
    background: rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

/* Export Options */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.export-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.export-option:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.export-option i {
    font-size: 2rem;
}

.export-code {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 8px;
    padding: 1rem;
    display: none;
}

.export-code.active {
    display: block;
}

.export-code pre {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.export-code code {
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Checkbox Input */
.checkbox-input {
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
}

/* Range Input */
input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(71, 85, 105, 0.6);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #6366f1;
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-left: 0.5rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

.bounce-in {
    animation: bounceIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounceIn {
    from { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 280px 1fr;
    }
    
    .properties-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 999;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .header {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
