/* Editor Page Specific Styles */

/* Hero Container */
.hero-container {
    position: relative;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    margin: 100px 0 40px;
    z-index: 1;
}

/* Hero Section */
.hero-modern-hero {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    box-sizing: border-box;
}

/* Social Media Icons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-icon i {
    transition: transform 0.3s ease;
}

.social-icon:hover i {
    transform: scale(1.2);
}

/* Specific icon colors on hover */
.social-icon[aria-label="YouTube"]:hover {
    background: #ff0000;
    color: white;
}

.social-icon[aria-label="Facebook"]:hover {
    background: #1877f2;
    color: white;
}

.social-icon[aria-label="Instagram"]:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.social-icon[aria-label="TikTok"]:hover {
    background: #000000;
    color: #69c9d0;
}

/* Make footer semi-transparent */
footer {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    z-index: 1000;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Dark theme adjustments */
[data-theme="dark"] .hero-modern-hero,
[data-theme="dark"] footer {
    background: rgba(0, 0, 0, 0.2) !important;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2.5rem 0 1rem;
    max-width: 100%;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-width: 180px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.hero-btn i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.hero-btn:hover i {
    transform: translateX(3px);
}

/* Ripple effect */
.hero-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.hero-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(50, 50);
        opacity: 0;
    }
}

/* Button variants */
.hero-btn.new-project {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.hero-btn.new-project:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.hero-btn.new-project:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.hero-btn.open-project {
    background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.hero-btn.open-project:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
}

.hero-btn.open-project:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.hero-btn.templates {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

.hero-btn.templates:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.4);
}

.hero-btn.templates:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
}

/* Focus state for all buttons */
.hero-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.hero-btn.templates {
    background: linear-gradient(45deg, #4338ca, #5e52e8);
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.3);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-container {
        padding: 15px;
    }
    
    .hero-modern-hero {
        padding: 25px 20px;
    }
    
    .hero-actions {
        flex-direction: row;
        gap: 1rem;
        width: auto;
        padding: 0;
    }
    
    .hero-btn {
        width: auto;
        min-width: 140px;
        margin: 0;
        padding: 12px 24px;
    }
    
    .hero-modern-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .hero-modern-desc {
        font-size: 1rem;
        margin-bottom: 20px;
    }
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .hero-container {
        padding: 10px;
        margin: 150px 0 30px;
    }
    
    .hero-modern-hero {
        padding: 20px 15px;
        margin: 10px 0;
    }
    
    .hero-modern-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .hero-modern-desc {
        font-size: 0.9rem;
        margin-bottom: 18px;
    }
    
    .hero-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .hero-btn i {
        font-size: 0.9em;
    }
}


/* Modern Editor Container */
.editor-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
    position: relative;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Ensure proper stacking context */
.editor-container * {
    box-sizing: border-box;
}

.mobile-tabs {
  display: none; /* Hidden by default on large screens */
  background-color: var(--background-color);
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background-color: var(--background-color);
  color: var(--text-color);
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

/* Ensure editor area is visible */
.editor-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    background: var(--surface-color);
}

.editor-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: var(--surface-color);
}

.editor-pane.active {
    display: block;
}

/* Ensure Monaco editor container is visible */
.monaco-editor {
    width: 100% !important;
    height: 100% !important;
    min-height: 400px !important;
}

/* Loading state for editor */
.editor-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.editor-loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Editor Header */
/* Editor Header with Glass Effect */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.8rem;
    background: rgba(26, 26, 46, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.3), transparent);
    opacity: 0.6;
}

/* Editor Title */
.editor-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    position: relative;
    padding: 0.4rem 0;
}

.editor-title i {
    color: #6c63ff;
    font-size: 1.2em;
    transition: transform 0.3s ease, color 0.3s ease;
}

.editor-title:hover i {
    transform: rotate(15deg);
    color: #7a6ff8;
}

/* Editor Actions */
.editor-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.editor-actions button {
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid rgba(108, 99, 255, 0.15);
    color: #e2e2ff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.editor-actions button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(108, 99, 255, 0.2), rgba(122, 111, 248, 0.3));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.editor-actions button:hover {
    background: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 99, 255, 0.15);
    color: #fff;
}

.editor-actions button:hover::before {
    opacity: 1;
}

.editor-actions button i {
    font-size: 1em;
    transition: transform 0.2s ease;
}

.editor-actions button:hover i {
    transform: scale(1.1);
}

.editor-actions button i {
    font-size: 0.9em;
}

/* Action Buttons */
.action-btn {
    background: rgba(138, 131, 255, 0.1);
    border: 1px solid rgba(138, 131, 255, 0.2);
    color: #e2e2ff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(108, 99, 255, 0.3), rgba(122, 111, 248, 0.4));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-btn:hover {
    background: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 99, 255, 0.2);
    color: #fff;
    border-color: rgba(138, 131, 255, 0.4);
}

.action-btn:hover::before {
    opacity: 1;
}

.action-btn i {
    transition: transform 0.2s ease;
}

.action-btn:hover i {
    transform: translateX(3px);
}

.action-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* Toggle Preview Button in Editor Actions */
#togglePreviewBtn {
    transition: all 0.3s ease;
}

#togglePreviewBtn.preview-hidden {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

#togglePreviewBtn.preview-hidden i {
    transform: rotate(180deg);
}

/* Editor Layout */
.editor-layout {
    display: flex;
    flex-direction: row;
    flex: 1 1 100%;
    min-height: 0;
    height: 100vh;
    overflow: hidden;
}

/* Code Panel */
.code-panel {
    flex: 1 1 60%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
}

/* File Tabs */
.file-tabs {
    display: flex;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.tab:hover {
    background: var(--background-color);
}

.tab.active {
    background: var(--background-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab i {
    font-size: 0.9rem;
}

.tab span {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.tab-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.tab-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.add-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-tab:hover {
    background: var(--surface-color);
    color: var(--text-primary);
}

/* Editor Footer */
.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.editor-info {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
}

.settings-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: var(--surface-color);
    color: var(--text-primary);
}

/* Resize Handle */
.resize-handle {
    width: 4px;
    background: var(--border-color);
    cursor: col-resize;
    transition: background 0.3s ease;
    position: relative;
}

.resize-handle:hover {
    background: var(--primary-color);
}

.resize-handle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    right: -2px;
    bottom: 0;
}

/* Preview Panel */
.preview-panel {
    flex: 1 1 40%;
    min-height: 200px;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-title i {
    color: var(--primary-color);
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    background: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--primary-color);
}



/* Preview Panel Hidden State */
.preview-panel.preview-hidden {
    display: none;
}

/* Mobile specific toggle button */
@media (max-width: 768px) {

    
    /* When preview is hidden, expand code panel */
    .preview-panel.preview-hidden + .code-panel {
        flex: 1 1 100%;
    }
}

.device-selector {
    display: flex;
    gap: 5px;
    background: var(--surface-color);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.device-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.device-btn:hover {
    color: var(--text-primary);
}

.device-btn.active {
    background: var(--gradient-primary);
    color: white;
}

.preview-container {
    flex: 1 1 auto;
    padding: 0;
    background: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 0;
}

#previewFrame {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    background: white;
    transition: all 0.3s ease;
}

.preview-container.tablet #previewFrame {
    width: 768px;
    max-width: 100%;
}

.preview-container.mobile #previewFrame {
    width: 375px;
    max-width: 100%;
}



/* Responsive Design */
@media (max-width: 1024px) {
    .editor-layout {
        flex-direction: column;
    }
    
    .code-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .resize-handle {
        display: none;
    }
    
    .preview-container.tablet #previewFrame,
    .preview-container.mobile #previewFrame {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .editor-header {
        padding: 10px 15px;
    }
    
    .editor-actions {
        gap: 5px;
    }
    
    .action-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .file-tabs {
        overflow-x: auto;
    }
    
    .tab {
        padding: 10px 12px;
    }
    
    .preview-header {
        padding: 10px 12px;
    }
    
    .device-selector {
        display: none;
    }
    
    /* Ensure toggle preview button is visible on mobile */
    .preview-actions {
        display: flex !important;
        gap: 8px;
        align-items: center;
        flex-wrap: nowrap;
    }
    

    
    /* Enhanced mobile preview visibility */
    .preview-panel {
        min-height: 250px;
        max-height: 40vh;
        border-top: 1px solid var(--border-color);
    }
    
    /* Ensure preview header is properly spaced */
    .preview-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
        background: var(--surface-color);
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Make sure all preview buttons are visible */
    .preview-actions {
        display: flex !important;
        gap: 6px;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .preview-container {
        min-height: 200px;
    }
    
    #previewFrame {
        min-height: 200px;
    }
    
    .preview-title {
        font-size: 0.9rem;
    }
    
      .preview-btn {
    padding: 4px 8px;
    font-size: 0.8rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
  }
  

}

/* Loading States */
.loading-editor {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.loading-editor i {
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Fullscreen Mode */
.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    padding-top: 0 !important;
}

.fullscreen .navbar {
    display: none;
}

/* Animations */
@keyframes fadeInEditor {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.editor-container {
    animation: fadeInEditor 0.5s ease forwards;
}

/* Editor Settings Modal Styles - Blue Dark Mode */
.modal#editorSettingsModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(30,41,59,0.32);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}
.modal#editorSettingsModal.active {
  display: flex;
}
.editor-settings-modal {
  background: #181f2a;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(30,41,59,0.18);
  max-width: 420px;
  width: 96vw;
  max-height: 480px;
  min-height: 320px;
  padding: 0;
  overflow: hidden;
  animation: modalIn 0.22s cubic-bezier(.4,2,.6,1);
  border: 1.5px solid #232946;
  position: relative;
  z-index: 10000;
}
@keyframes modalIn {
  from { transform: translateY(40px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.editor-settings-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #232946;
  padding: 18px 24px 12px 24px;
  border-bottom: 1px solid #334155;
}
.editor-settings-modal .modal-header h3 {
  color: #60a5fa;
  font-size: 1.18em;
  margin: 0;
  letter-spacing: 0.01em;
}
.editor-settings-modal .modal-close {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 1.2em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.editor-settings-modal .modal-close:hover {
  background: #60a5fa;
  color: #232946;
}
.editor-settings-modal .modal-body {
  padding: 20px 20px 12px 20px;
  background: #181f2a;
  color: #fff;
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #334155 #181f2a;
}

.editor-settings-modal .modal-body::-webkit-scrollbar {
  width: 6px;
}

.editor-settings-modal .modal-body::-webkit-scrollbar-track {
  background: #181f2a;
}

.editor-settings-modal .modal-body::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.editor-settings-modal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #475569;
}
.settings-section {
  margin-bottom: 22px;
}
.settings-section h4 {
  font-size: 1.08em;
  font-weight: 600;
  margin-bottom: 12px;
  color: #3b82f6;
  border-bottom: 1px solid #334155;
  padding-bottom: 5px;
  letter-spacing: 0.01em;
}
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(60,60,80,0.08);
}
.setting-item:last-child {
  border-bottom: none;
}
.setting-item label {
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1em;
}
.setting-item select,
.setting-item input[type="range"] {
  background: #232946;
  border: 1px solid #334155;
  color: #60a5fa;
  padding: 6px 10px;
  border-radius: 6px;
  min-width: 120px;
  font-size: 1em;
  transition: border 0.2s, box-shadow 0.2s;
}
.setting-item select:focus,
.setting-item input[type="range"]:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 2px #3b82f655;
}
.setting-item input[type="checkbox"] {
  accent-color: #3b82f6;
  width: 18px;
  height: 18px;
  margin: 0 4px 0 0;
  border-radius: 4px;
  cursor: pointer;
}
#fontSizeValue {
  margin-left: 10px;
  font-size: 0.98em;
  color: #60a5fa;
  min-width: 40px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 20px 14px 20px;
  background: #232946;
  border-top: 1px solid #334155;
}
.btn.btn-primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 22px;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.btn.btn-primary:hover {
  background: #60a5fa;
  color: #232946;
}
.btn.btn-secondary {
  background: #181f2a;
  color: #60a5fa;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 22px;
  font-weight: 500;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.btn.btn-secondary:hover {
  background: #232946;
  color: #3b82f6;
}
@media (max-width: 600px) {
  /* Mobile preview optimizations */
  .preview-panel {
    min-height: 200px;
    max-height: 35vh;
  }
  
  .preview-container {
    min-height: 150px;
  }
  
  #previewFrame {
    min-height: 150px;
  }
  
  .preview-title {
    font-size: 0.85rem;
  }
  
  .preview-btn {
    padding: 3px 6px;
    font-size: 0.75rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
  }
  
  .editor-settings-modal {
    max-width: 95vw;
    max-height: 85vh;
    width: 90vw;
    padding: 0;
  }
  
  .editor-settings-modal .modal-header {
    padding: 12px 16px 8px 16px;
  }
  
  .editor-settings-modal .modal-header h3 {
    font-size: 1rem;
  }
  
  .editor-settings-modal .modal-body {
    padding: 12px 16px 8px 16px;
    max-height: 60vh;
  }
  
  .editor-settings-modal .modal-footer {
    padding: 10px 16px 10px 16px;
  }
  
  .settings-section {
    margin-bottom: 16px;
  }
  
  .settings-section h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }
  
  .setting-item {
    padding: 6px 0;
    gap: 12px;
  }
  
  .setting-item label {
    font-size: 0.9rem;
  }
  
  .setting-item select,
  .setting-item input[type="range"] {
    min-width: 100px;
    font-size: 0.9rem;
    padding: 4px 8px;
  }
  
  .setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
  
  .btn.btn-primary,
  .btn.btn-secondary {
    padding: 6px 16px;
    font-size: 0.9rem;
  }
  
  .modal-footer {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  /* Extra small screen preview optimizations */
  .preview-panel {
    min-height: 180px;
    max-height: 30vh;
  }
  
  .preview-container {
    min-height: 130px;
  }
  
  #previewFrame {
    min-height: 130px;
  }
  
  .preview-title {
    font-size: 0.8rem;
  }
  
  .preview-btn {
    padding: 2px 5px;
    font-size: 0.7rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
  }
  

  
  .editor-settings-modal {
    max-width: 98vw;
    width: 95vw;
    max-height: 90vh;
  }
  
  .editor-settings-modal .modal-header {
    padding: 10px 12px 6px 12px;
  }
  
  .editor-settings-modal .modal-header h3 {
    font-size: 0.95rem;
  }
  
  .editor-settings-modal .modal-body {
    padding: 10px 12px 6px 12px;
    max-height: 65vh;
  }
  
  .editor-settings-modal .modal-footer {
    padding: 8px 12px 8px 12px;
  }
  
  .settings-section {
    margin-bottom: 12px;
  }
  
  .settings-section h4 {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }
  
  .setting-item {
    padding: 4px 0;
    gap: 8px;
  }
  
  .setting-item label {
    font-size: 0.85rem;
  }
  
  .setting-item select,
  .setting-item input[type="range"] {
    min-width: 80px;
    font-size: 0.85rem;
    padding: 3px 6px;
  }
  
  .setting-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
  }
  
  .btn.btn-primary,
  .btn.btn-secondary {
    padding: 5px 12px;
    font-size: 0.85rem;
  }
  
  #fontSizeValue {
    font-size: 0.85rem;
    min-width: 35px;
  }
  
  .modal-footer {
    gap: 6px;
  }
}

/* Hero Modern Section */
.hero-modern-hero {
  padding: 60px 20px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-modern-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-modern-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-search-bar {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface-color);
  border-radius: 50px;
  padding: 8px 20px 8px 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.hero-search-bar:focus-within {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.hero-search-bar i {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 1.2rem;
}

.hero-search-bar input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  outline: none;
}

.hero-search-bar input::placeholder {
  color: var(--text-tertiary);
}

/* General Editor Layout Improvements */
.editor-container {
  margin: 20px auto 60px auto;
  max-width: 1400px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(30,41,59,0.10);
  overflow: hidden;
  position: relative;
  z-index: 0;
  transition: all 0.3s ease;
}
.editor-header {
  padding: 18px 32px 12px 32px;
  background: #181f2a;
  border-radius: 18px 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid #232946;
}
.editor-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eebbc3;
  font-size: 1.18em;
  font-weight: 600;
}
.editor-actions {
  display: flex;
  gap: 10px;
}
.action-btn {
  background: #232946;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.action-btn:hover {
  
  color: #232946;
}
.editor-layout {
  display: flex;
  gap: 0;
  background: #232946;
  min-height: calc(100vh - 100px);
}
.code-panel {
  flex: 1 1 60%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #181f2a;
  border-right: 1.5px solid #232946;
  min-height: 300px;
}
.preview-panel {
  flex: 1 1 40%;
  min-width: 0;
  background: #181f2a;
  display: flex;
  flex-direction: column;
  border-left: 1.5px solid #232946;
  min-height: 250px;
}
.editor-area {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 400px;
}
.editor-pane {
  flex: 1 1 auto;
  min-height: 300px;
  background: #232946;
  border-radius: 0 0 0 0;
}
.preview-container {
  flex: 1 1 auto;
  background: #232946;
  border-radius: 0 0 0 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
#previewFrame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  border-radius: 0 0 0 0;
}
@media (max-width: 900px) {
  .mobile-tabs {
    display: flex;
  }

  .editor-layout {
    flex-direction: column;
    height: calc(100% - 45px); /* Adjust height for tabs */
  }

  .code-panel, .preview-panel {
      display: none;
  }

  .code-panel.active-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .preview-panel.active-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
  }


  .resize-handle {
      display: none;
  }
}


.editor-header, .editor-footer, .code-panel, .preview-panel {
    background: var(--surface-color) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.action-btn, .preview-btn, .device-btn {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px var(--shadow-light) !important;
}

