/* ===== GLOBAL RESET ===== */
* { font-family: 'Inter', sans-serif; margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ===== COOKIE CONSENT BANNER - GDPR COMPLIANT ===== */
/* All buttons equally visible, no highlighting on Accept */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: none;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border-top: 2px solid;
    border-image: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6) 1;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5), 0 -5px 20px rgba(59, 130, 246, 0.2);
    animation: cookieSlideUp 0.4s ease-out;
}

.cookie-banner.show {
    display: block;
}

@keyframes cookieSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.cookie-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    flex-shrink: 0;
}

.cookie-text-wrap {
    flex: 1;
}

.cookie-title {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.cookie-text {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0;
}

.cookie-text strong {
    color: #fbbf24;
}

.cookie-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.cookie-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* ===== EQUAL BUTTON STYLING - NO HIGHLIGHTING ===== */
.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    min-width: 130px;
    justify-content: center;
}

/* Accept button - NO special highlighting, equal to others */
.cookie-btn-accept {
    background: #10b981;
    color: white;
    border: 2px solid #10b981;
}

.cookie-btn-accept:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
}

/* Reject button - Equal styling */
.cookie-btn-reject {
    background: transparent;
    color: #e2e8f0;
    border: 2px solid #475569;
}

.cookie-btn-reject:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
    transform: translateY(-1px);
}

/* Customize button - Equal styling */
.cookie-btn-customize {
    background: transparent;
    color: #e2e8f0;
    border: 2px solid #475569;
}

.cookie-btn-customize:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
}

.cookie-btn-save {
    background: #3b82f6;
    color: white;
    border: 2px solid #3b82f6;
    padding: 10px 24px;
}

.cookie-btn-save:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
}

/* Cookie Options Panel */
.cookie-options {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 20px;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.cookie-options.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.cookie-option:last-of-type {
    border-bottom: none;
}

.cookie-option-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-option-name {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-option-name i {
    width: 16px;
    color: #64748b;
}

.cookie-option-desc {
    font-size: 13px;
    color: #64748b;
    margin-left: 24px;
}

.cookie-options-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
}

/* Cookie Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #334155;
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #94a3b8;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #10b981;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(22px);
    background: white;
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle input:disabled + .cookie-toggle-slider::before {
    background: #64748b;
}

/* Cookie Policy Modal */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.cookie-modal-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.cookie-modal {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.cookie-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-modal-header h3 i {
    color: #3b82f6;
}

.cookie-modal-close {
    background: rgba(51, 65, 85, 0.5);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 55vh;
}

.cookie-modal-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 20px 0 10px 0;
}

.cookie-modal-body h4:first-child {
    margin-top: 0;
}

.cookie-modal-body p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0 0 12px 0;
}

.cookie-modal-body ul {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

.cookie-modal-body li {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.7;
    margin: 8px 0;
}

.cookie-modal-body li strong {
    color: #e2e8f0;
}

.cookie-modal-body a {
    color: #60a5fa;
    text-decoration: none;
}

.cookie-modal-body a:hover {
    text-decoration: underline;
}

.cookie-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    display: flex;
    justify-content: flex-end;
}

/* ===== MOBILE COOKIE BANNER ===== */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 16px;
        background: rgba(15, 23, 42, 0.98);
        border-top: 2px solid;
        border-image: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899) 1;
    }
    
    .cookie-content {
        flex-direction: column;
        padding: 0;
        gap: 16px;
    }
    
    .cookie-left {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .cookie-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .cookie-title {
        font-size: 15px;
    }
    
    .cookie-text {
        font-size: 13px;
        text-align: center;
    }
    
    /* Stack buttons vertically on mobile */
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 14px;
        min-width: unset;
    }
    
    .cookie-options {
        padding: 0 0 16px;
        margin-top: 12px;
    }
    
    .cookie-option {
        padding: 10px 0;
    }
    
    .cookie-option-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .cookie-option-desc {
        margin-left: 24px;
        font-size: 12px;
    }
    
    .cookie-options-actions {
        padding-top: 16px;
    }
    
    .cookie-btn-save {
        width: 100%;
    }
}

/* ===== TOP BAR ===== */
.top-bar {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    position: relative;
    overflow: hidden;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    z-index: 50;
}
.floating-tag {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    opacity: 0.6;
    animation: float 25s infinite ease-in-out;
    pointer-events: none;
    white-space: nowrap;
    color: #ffffff;
    font-size: 14px;
    z-index: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.4; }
    50% { transform: translateY(-20px) translateX(10px); opacity: 0.8; }
}
.logo-main {
    font-size: 28px; font-weight: 900; letter-spacing: 1px;
    background: linear-gradient(90deg, #ff0000, #ff4000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0000);
    background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: rainbowText 3s linear infinite;
}
@keyframes rainbowText { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.logo-sub {
    color: #ffffff; font-size: 20px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; border-left: 2px solid rgba(255,255,255,0.3); padding-left: 8px; margin-left: 4px;
}
.glass-panel {
    background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; padding: 8px 16px;
}


.datetime-display { font-size: 14px; font-weight: 700; color: #ffffff; text-align: right; line-height: 1.4; }
.datetime-date { font-size: 13px; color: #e5e7eb; text-transform: uppercase; }
.datetime-time { font-size: 16px; font-weight: 800; letter-spacing: 1px; }
.z-content { position: relative; z-index: 10; }

/* ===== AD PLACEMENT - SAFE POSITIONING ===== */
/* Ad is between top bar and toolbar - NOT near any functional buttons */
.ad-placement {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    border-bottom: 1px solid #334155;
    padding: 12px 16px;
    display: none; /* Hidden by default, shown when ad loads */
    align-items: center;
    justify-content: center;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.ad-placement.ad-loaded {
    display: flex;
}

/* Ad wrapper for safe positioning */
.ad-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 728px;
    width: 100%;
}

/* Ad label - clearly visible */
.ad-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-align: center;
}

/* Ad container - safe padding around */
.ad-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    width: 100%;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AdSense specific styles */
.ad-container .adsbygoogle {
    display: block;
    width: 100%;
    height: 90px;
}

/* When ad is loaded, remove placeholder styling */
.ad-placement.ad-loaded .ad-container {
    background: transparent;
    border: none;
    padding: 0;
}

.ad-placement.ad-loaded .ad-label {
    display: block;
}

/* Mobile ad styles - thumb zone safety */
@media (max-width: 768px) {
    .ad-placement {
        padding: 10px 12px;
        min-height: 70px;
    }

    .ad-wrapper {
        gap: 4px;
    }

    .ad-label {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .ad-container {
        min-height: 60px;
        padding: 6px;
    }

    .ad-container .adsbygoogle {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .ad-placement {
        padding: 8px 10px;
        min-height: 60px;
    }

    .ad-container {
        min-height: 50px;
        padding: 4px;
    }

    .ad-container .adsbygoogle {
        height: 50px;
    }
}

/* ===== TOOLBAR ===== */
.toolbar {
    background: #1e293b; border-bottom: 1px solid #334155;
    padding: 8px 24px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.file-tabs { display: flex; gap: 4px; align-items: center; }
.file-tab {
    display: flex; align-items: center; gap: 8px; padding: 8px 16px;
    background: #0f172a; border: 1px solid #334155; border-radius: 6px;
    cursor: pointer; color: #94a3b8; font-size: 13px; font-weight: 600; transition: all 0.2s; position: relative;
}
.file-tab:hover { background: #1e293b; color: #e2e8f0; }
.file-tab.active { background: #3b82f6; color: #ffffff; border-color: #3b82f6; }
.file-tab i { font-size: 14px; }
.file-tab.html-tab i { color: #e34c26; }
.file-tab.css-tab i { color: #264de4; }
.file-tab.js-tab i { color: #f7df1e; }
.file-tab.active i { color: #ffffff; }
.tab-copy-btn {
    margin-left: 8px; padding: 4px 8px; background: rgba(255, 255, 255, 0.1);
    border-radius: 4px; color: #94a3b8; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.tab-copy-btn:hover { background: rgba(255, 255, 255, 0.2); color: #ffffff; }
.clear-all-btn {
    display: flex; align-items: center; gap: 6px; padding: 8px 12px;
    background: #ef4444; color: white; border: none; border-radius: 6px;
    cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.2s; margin-left: 8px;
}
.clear-all-btn:hover { background: #dc2626; transform: scale(1.05); }
.action-buttons { display: flex; gap: 8px; align-items: center; }
.btn {
    display: flex; align-items: center; gap: 6px; padding: 8px 16px;
    border: none; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-run { background: #10b981; color: white; }
.btn-run:hover { background: #059669; }
.btn-theme { background: #f59e0b; color: #0f172a; }
.btn-theme:hover { background: #d97706; }
.btn-icon {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    background: #334155; color: #e2e8f0; border: none; border-radius: 6px;
    cursor: pointer; transition: all 0.2s; font-size: 14px;
}
.btn-icon:hover { background: #475569; }
.menu-container { position: relative; }
.menu-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 8px;
    background: #1e293b; border: 1px solid #334155; border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5); min-width: 180px; display: none; z-index: 1000;
}
.menu-dropdown.show { display: block; }
.menu-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    color: #e2e8f0; font-size: 13px; cursor: pointer; transition: background 0.2s; border-bottom: 1px solid #334155;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: #334155; }
.menu-item i { width: 16px; color: #94a3b8; }

/* ===== COMPILER WRAPPER ===== */
.compiler-wrapper {
    flex-shrink: 0;
    height: calc(100vh - 160px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.main-container {
    display: flex; 
    height: 100%; 
    overflow: hidden; 
    flex: 1;
    position: relative;
    width: 100%;
}
.editor-section {
    width: 50%; 
    display: flex; 
    flex-direction: column;
    background: #ffffff; 
    border-right: 2px solid #e2e8f0;
    min-width: 150px;
    max-width: 85%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.editor-wrapper { 
    flex: 1; 
    position: relative; 
    overflow: hidden; 
    width: 100%;
    height: 100%;
}
.CodeMirror {
    height: 100% !important; 
    font-family: 'Fira Code', monospace;
    font-size: 14px; 
    line-height: 1.6; 
    background: #ffffff !important;
    width: 100% !important;
}
.preview-section {
    width: 50%; 
    display: flex; 
    flex-direction: column;
    background: #1e293b; 
    position: relative; 
    transition: all 0.3s ease; 
    overflow: hidden;
    min-width: 150px;
    max-width: 85%;
    flex-shrink: 0;
}
.preview-section.mobile-mode {
    background: #0f172a; 
    justify-content: flex-start; 
    align-items: center;
    padding: 40px 20px; 
    overflow-y: auto;
}
.phone-frame {
    position: relative; width: 360px; height: 760px; background: #000;
    border-radius: 40px; padding: 12px;
    box-shadow: 0 0 0 2px #334155, 0 20px 50px -10px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.1);
    transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; margin-bottom: 20px;
}
.phone-screen { width: 100%; height: 100%; background: #fff; border-radius: 32px; overflow: hidden; position: relative; }
.phone-notch {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 100px; height: 28px; background: #000; border-radius: 20px; z-index: 50;
}
.phone-branding {
    margin-top: 16px; font-size: 14px; font-weight: 700; color: #94a3b8;
    letter-spacing: 2px; text-transform: uppercase; opacity: 0.8; white-space: nowrap;
}
.phone-branding span {
    background: linear-gradient(90deg, #ff0000, #ff4000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0000);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900;
}
.preview-section.mobile-mode .preview-header { display: none; }
.preview-section.mobile-mode #preview-frame {
    width: 100%; height: 100%; border: none; background: white; border-radius: 32px;
}
.preview-header {
    padding: 12px 16px; background: #0f172a; border-bottom: 1px solid #334155;
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.preview-title { font-weight: 600; color: #94a3b8; font-size: 14px; display: flex; align-items: center; gap: 8px; }
#preview-frame { 
    width: 100%; 
    height: 100%; 
    border: none; 
    background: white; 
    transition: all 0.3s ease; 
    display: block;
}
.loading-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.9); display: flex; flex-direction: column;
    align-items: center; justify-content: center; z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.loading-overlay.active { opacity: 1; pointer-events: all; }
.loading-spinner {
    width: 50px; height: 50px; border: 4px solid #334155; border-top: 4px solid #10b981;
    border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 16px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loading-text { color: #ffffff; font-size: 14px; font-weight: 600; }
.error-display {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: #1e293b; display: none; flex-direction: column;
    align-items: center; justify-content: center; z-index: 100; padding: 40px; text-align: center;
}
.error-display.active { display: flex; }
.error-icon { font-size: 48px; color: #ef4444; margin-bottom: 16px; }
.error-title { color: #ffffff; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.error-message { color: #94a3b8; font-size: 14px; max-width: 500px; }

/* ===== PERFECT RESIZER STYLES ===== */
.resizer {
    width: 10px;
    background: #334155;
    cursor: col-resize;
    transition: all 0.15s ease;
    z-index: 9999;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.resizer:hover {
    background: #60a5fa;
    width: 12px;
}

.resizer.resizing {
    background: #3b82f6;
    width: 14px;
    cursor: col-resize;
}

/* Resizer grip indicator - 3 dots */
.resizer::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 -8px 0 rgba(255, 255, 255, 0.4), 0 8px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.2s;
    pointer-events: none;
}

.resizer:hover::before {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 -8px 0 rgba(255, 255, 255, 0.7), 0 8px 0 rgba(255, 255, 255, 0.7);
}

.resizer.resizing::before {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 -8px 0 rgba(255, 255, 255, 1), 0 8px 0 rgba(255, 255, 255, 1);
}

/* Resizer overlay for smooth dragging */
.resizer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 9998;
    display: none;
    cursor: col-resize;
}

.resizer-overlay.active {
    display: block;
}

/* Prevent text selection during resize */
body.resizing,
body.resizing * {
    cursor: col-resize !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    pointer-events: none;
}

body.resizing .resizer,
body.resizing .resizer-overlay {
    pointer-events: auto;
}

/* ===== SEO CONTENT SECTION ===== */
.seo-content-section {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    padding: 60px 24px;
    border-top: 1px solid #334155;
    flex: 1;
}
.seo-container { max-width: 1200px; margin: 0 auto; color: #e2e8f0; }
.seo-block {
    background: rgba(30, 41, 59, 0.6); border: 1px solid #334155;
    border-radius: 16px; padding: 32px; margin-bottom: 32px; backdrop-filter: blur(8px);
}

/* Hero Block Special Styling */
.hero-block {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid rgba(59, 130, 246, 0.3);
}

/* ===== HEADING STYLES WITH EMOJI FIX ===== */
.seo-block h1,
.seo-block h2,
.seo-block h3,
.seo-block h4 {
    color: #f1f5f9;
    font-weight: 700;
    margin-bottom: 20px;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    text-fill-color: initial !important;
}

.seo-block h1 { font-size: 32px; line-height: 1.3; }
.seo-block h2 { font-size: 26px; font-weight: 800; line-height: 1.4; }
.seo-block h3 { font-size: 22px; font-weight: 700; margin: 24px 0 16px; padding-bottom: 12px; border-bottom: 2px solid #334155; }
.seo-block h4 { font-size: 18px; border: none; margin-bottom: 12px; }

.seo-block p { line-height: 1.8; color: #94a3b8; margin-bottom: 16px; font-size: 16px; }
.seo-block strong { color: #f1f5f9; font-weight: 600; }
.seo-lead { font-size: 17px; line-height: 1.9; color: #cbd5e1; margin-bottom: 20px; }
.seo-block code {
    background: rgba(15, 23, 42, 0.8); padding: 3px 8px; border-radius: 4px;
    font-family: 'Fira Code', monospace; font-size: 14px; color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.seo-block pre {
    background: #0f172a; border: 1px solid #334155; border-radius: 8px;
    padding: 16px; overflow-x: auto; margin: 16px 0;
}
.seo-block pre code { background: none; padding: 0; color: #e2e8f0; font-size: 13px; line-height: 1.6; border: none; }
.code-example {
    background: rgba(15, 23, 42, 0.4); border-left: 4px solid #3b82f6;
    padding: 20px; margin: 20px 0; border-radius: 0 8px 8px 0;
}
.code-example h4 { font-size: 16px; color: #94a3b8; margin-bottom: 12px; font-weight: 600; }

/* Fundamentals Grid */
.fundamentals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.fundamental-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.fundamental-card:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
}

.fundamental-card h4 {
    color: #f1f5f9;
    font-size: 17px;
    margin-bottom: 12px;
}

.fundamental-card p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
}

/* Tags Table */
.tags-table-container {
    overflow-x: auto;
    margin-top: 24px;
    border-radius: 12px;
    border: 1px solid #334155;
}

.tags-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tags-table thead {
    background: rgba(15, 23, 42, 0.8);
}

.tags-table th {
    padding: 16px;
    text-align: left;
    color: #f1f5f9;
    font-weight: 600;
    border-bottom: 2px solid #334155;
}

.tags-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #334155;
    color: #94a3b8;
}

.tags-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.4);
}

.tags-table code {
    background: rgba(15, 23, 42, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* Box Model Diagram */
.box-model-diagram {
    margin: 32px auto;
    max-width: 500px;
}

.box-margin {
    background: rgba(251, 191, 36, 0.2);
    border: 2px dashed #fbbf24;
    padding: 40px;
    border-radius: 16px;
    position: relative;
}

.box-border {
    background: rgba(16, 185, 129, 0.2);
    border: 3px solid #10b981;
    padding: 30px;
    border-radius: 12px;
    position: relative;
}

.box-padding {
    background: rgba(59, 130, 246, 0.2);
    border: 2px dashed #3b82f6;
    padding: 30px;
    border-radius: 8px;
    position: relative;
}

.box-content {
    background: rgba(139, 92, 246, 0.3);
    border: 2px solid #8b5cf6;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    position: relative;
}

.box-content p {
    margin: 0;
    font-size: 14px;
    color: #e2e8f0;
}

.box-label {
    position: absolute;
    top: -12px;
    left: 16px;
    background: #1e293b;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
    border-radius: 20px;
    border: 1px solid currentColor;
}

/* Responsive Breakpoints */
.responsive-breakpoints {
    margin-top: 24px;
    background: rgba(15, 23, 42, 0.4);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid #10b981;
}

.responsive-breakpoints h4 {
    color: #f1f5f9;
    margin-bottom: 16px;
    font-size: 18px;
}

.breakpoint-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.breakpoint-list li {
    padding: 10px 0;
    color: #94a3b8;
    font-size: 15px;
    border-bottom: 1px solid #334155;
}

.breakpoint-list li:last-child {
    border-bottom: none;
}

.breakpoint-list li strong {
    color: #f1f5f9;
    display: inline-block;
    min-width: 140px;
}

/* Step List */
.step-list { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.step-item { display: flex; gap: 20px; align-items: flex-start; }
.step-number {
    min-width: 40px; height: 40px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.step-content { flex: 1; }
.step-content h4 { color: #f1f5f9; margin-bottom: 8px; font-size: 18px; }
.step-content p { margin: 0; color: #94a3b8; font-size: 15px; line-height: 1.7; }
.step-content .sub-list { margin: 12px 0 0 24px; padding: 0; list-style: disc; color: #94a3b8; }
.step-content .sub-list li { margin: 8px 0; font-size: 14px; line-height: 1.6; }

/* Features Grid */
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; margin-top: 28px;
}
.feature-card {
    background: rgba(15, 23, 42, 0.5); border: 1px solid #334155;
    border-radius: 12px; padding: 24px; transition: all 0.3s ease;
}
.feature-card:hover { transform: translateY(-4px); border-color: #3b82f6; box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2); }
.feature-icon { font-size: 32px; margin-bottom: 16px; }
.feature-card h4 { color: #f1f5f9; margin: 12px 0 12px; font-size: 17px; }
.feature-card p { font-size: 14px; color: #94a3b8; margin: 0; line-height: 1.6; }

/* Tips Grid */
.tips-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px; margin-top: 28px;
}
.tip-item { 
    background: rgba(30, 41, 59, 0.5); 
    padding: 24px; 
    border-radius: 12px; 
    border-left: 4px solid #10b981; 
    transition: all 0.3s ease;
}
.tip-item:hover { border-left-color: #34d399; background: rgba(30, 41, 59, 0.7); }
.tip-item h4 { color: #f1f5f9; margin-bottom: 14px; font-size: 17px; }
.tip-item p { color: #94a3b8; font-size: 14px; margin: 0; line-height: 1.7; }
.tip-item ul { margin: 12px 0 0 20px; padding: 0; }
.tip-item ul li { color: #94a3b8; font-size: 14px; margin: 8px 0; line-height: 1.5; }
.tip-item kbd {
    background: rgba(15, 23, 42, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #fbbf24;
    border: 1px solid #334155;
}

/* Use Cases Grid */
.usecases-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; margin-top: 28px;
}
.usecase-card {
    background: rgba(30, 41, 59, 0.5); border: 1px solid #334155;
    border-radius: 12px; padding: 24px; text-align: center; transition: all 0.3s ease;
}
.usecase-card:hover { border-color: #8b5cf6; transform: translateY(-4px); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2); }
.usecase-icon { font-size: 36px; margin-bottom: 16px; }
.usecase-card h4 { color: #f1f5f9; margin: 12px 0 12px; font-size: 16px; }
.usecase-card p { font-size: 14px; color: #94a3b8; margin: 0; line-height: 1.6; }

/* Best Practices Content */
.best-practices-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.practice-section {
    background: rgba(15, 23, 42, 0.4);
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    transition: all 0.3s ease;
}

.practice-section:hover {
    border-left-color: #60a5fa;
    background: rgba(15, 23, 42, 0.6);
}

.practice-section h4 {
    color: #f1f5f9;
    font-size: 17px;
    margin-bottom: 12px;
}

.practice-section p {
    color: #94a3b8;
    font-size: 15px;
    margin: 0;
    line-height: 1.7;
}

.practice-section code {
    font-size: 13px;
}

/* Highlight Block */
.highlight-block {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border: 2px solid #3b82f6;
    position: relative;
    overflow: hidden;
}
.highlight-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}
.highlight-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; position: relative; z-index: 1; }
.highlight-badge {
    background: linear-gradient(135deg, #8b5cf6, #ec4899); color: white; padding: 6px 16px; border-radius: 20px;
    font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}
.highlight-text { font-size: 16px; color: #cbd5e1; margin-bottom: 20px; line-height: 1.8; position: relative; z-index: 1; }
.feature-list { list-style: none; padding: 0; margin: 0 0 20px; position: relative; z-index: 1; }
.feature-list li {
    padding: 12px 0; color: #94a3b8; font-size: 15px; display: flex; align-items: flex-start; gap: 12px; line-height: 1.6;
}
.feature-list li strong { color: #f1f5f9; min-width: 180px; flex-shrink: 0; }

/* FAQ */
.faq-item { margin: 16px 0; border: 1px solid #334155; border-radius: 10px; overflow: hidden; transition: all 0.3s ease; }
.faq-item:hover { border-color: #3b82f6; }
.faq-item summary {
    padding: 18px 24px; background: rgba(15, 23, 42, 0.6); cursor: pointer;
    font-weight: 600; color: #f1f5f9; list-style: none; display: flex; justify-content: space-between; align-items: center;
    font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:after { content: "+"; font-size: 24px; color: #60a5fa; font-weight: 300; }
.faq-item[open] summary:after { content: "−"; }
.faq-item[open] summary { background: rgba(59, 130, 246, 0.1); }
.faq-item p { padding: 20px 24px; margin: 0; background: rgba(30, 41, 59, 0.4); border-top: 1px solid #334155; color: #94a3b8; font-size: 15px; line-height: 1.7; }
.faq-item p strong { color: #f1f5f9; }

/* CTA Block */
.cta-block { 
    text-align: center; 
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2)); 
    border-color: #60a5fa;
    position: relative;
    overflow: hidden;
}
.cta-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}
.cta-text { font-size: 17px; color: #cbd5e1; margin-bottom: 28px; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.8; position: relative; z-index: 1; }
.btn-cta {
    display: inline-flex; align-items: center; gap: 10px; padding: 16px 40px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: white;
    border: none; border-radius: 12px; font-size: 17px; font-weight: 700;
    cursor: pointer; transition: all 0.3s; margin-top: 8px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}
.btn-cta:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.6); 
}
.btn-cta:hover::before {
    left: 100%;
}
.btn-cta i { font-size: 20px; }
.cta-note { 
    margin-top: 24px; 
    font-size: 14px; 
    color: #94a3b8; 
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    z-index: 1;
}
.cta-note span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== FOOTER ===== */
.main-footer {
    background: #020617;
    border-top: 1px solid #334155;
    padding: 24px;
    flex-shrink: 0;
    width: 100%;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.footer-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-link:hover { color: #3b82f6; }
.footer-divider { color: #475569; font-size: 14px; }

.footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.social-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.social-icon i { pointer-events: none; }
.social-icon.youtube { background: linear-gradient(135deg, #ff0000, #cc0000); }
.social-icon.youtube:hover { transform: translateY(-3px) scale(1.1); box-shadow: 0 0 20px rgba(255,0,0,0.5); }
.social-icon.instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-icon.instagram:hover { transform: translateY(-3px) scale(1.1); box-shadow: 0 0 20px rgba(220,39,67,0.5); }
.social-icon.twitter { background: linear-gradient(135deg, #1da1f2, #0d8bd9); }
.social-icon.twitter:hover { transform: translateY(-3px) scale(1.1); box-shadow: 0 0 20px rgba(29,161,242,0.5); }

.footer-bottom {
    max-width: 1200px; margin: 20px auto 0;
    text-align: center; padding-top: 20px; border-top: 1px solid #1e293b;
}
.footer-bottom p { color: #64748b; font-size: 13px; }

/* ===== TOAST & MODAL ===== */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: #10b981; color: white; padding: 14px 28px; border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); font-weight: 600; font-size: 14px;
    display: flex; align-items: center; gap: 10px; opacity: 0; transition: all 0.3s ease; z-index: 2000;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7); display: none; align-items: center;
    justify-content: center; z-index: 2000; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: #1e293b; border: 1px solid #334155; border-radius: 12px;
    padding: 28px; width: 420px; max-width: 90%; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #334155; }
.modal-title { color: #ffffff; font-size: 18px; font-weight: 700; }
.modal-close { background: transparent; border: none; color: #94a3b8; cursor: pointer; font-size: 20px; }
.modal-close:hover { color: #ffffff; }
.setting-item { margin-bottom: 24px; }
.setting-label { color: #94a3b8; font-size: 14px; margin-bottom: 10px; display: block; }
.font-slider { width: 100%; height: 6px; background: #334155; border-radius: 3px; outline: none; -webkit-appearance: none; }
.font-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: #3b82f6; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4); }
.font-value { color: #ffffff; font-size: 14px; font-weight: 600; margin-top: 10px; text-align: right; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .top-bar { height: 80px; padding: 0 16px; }
    .logo-main { font-size: 22px; }
    .logo-sub { font-size: 16px; }
    
    .compiler-wrapper { height: 50vh; }
    .editor-section, .preview-section { 
        width: 100% !important; 
        min-width: unset !important;
        max-width: unset !important;
    }
    .resizer { 
        width: 100%; 
        height: 12px; 
        cursor: row-resize;
    }
    .resizer::before {
        width: 40px;
        height: 4px;
        box-shadow: -8px 0 0 rgba(255, 255, 255, 0.4), 8px 0 0 rgba(255, 255, 255, 0.4);
    }
    .resizer:hover::before {
        box-shadow: -8px 0 0 rgba(255, 255, 255, 0.7), 8px 0 0 rgba(255, 255, 255, 0.7);
    }
    .resizer.resizing::before {
        box-shadow: -8px 0 0 rgba(255, 255, 255, 1), 8px 0 0 rgba(255, 255, 255, 1);
    }
    .clear-all-btn span { display: none; }
    .phone-frame { width: 320px; height: 680px; }

    .footer-container { flex-direction: column; text-align: center; }
    .footer-left { justify-content: center; }
    .footer-right { justify-content: center; }

    .step-item { flex-direction: column; }
    .step-number { margin-bottom: 12px; }
    .features-grid, .tips-grid, .usecases-grid { grid-template-columns: 1fr; }

    .seo-block { padding: 24px; }
    .seo-block h1 { font-size: 24px; }
    .seo-block h2 { font-size: 20px; }
    .feature-list li strong { min-width: auto; display: block; margin-bottom: 4px; }
    .cta-note { flex-direction: column; gap: 8px; }

    .fundamentals-grid { grid-template-columns: 1fr; }
    .tags-table { font-size: 12px; }
    .tags-table th, .tags-table td { padding: 10px; }
    .box-margin { padding: 20px; }
    .box-border { padding: 15px; }
    .box-padding { padding: 15px; }
    .box-content { padding: 10px; }
    .breakpoint-list li strong { display: block; margin-bottom: 4px; }
}


/* ===== MOBILE RESPONSIVE STYLES - FIXED ===== */
/* These styles only apply on mobile devices (max-width: 768px) */

@media (max-width: 768px) {
    /* --- TOP BAR MOBILE --- */
    .top-bar {
        height: 60px;
        padding: 0 10px;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .logo-main {
        font-size: 18px;
        letter-spacing: 0.5px;
    }

    .logo-sub {
        font-size: 12px;
        letter-spacing: 1px;
        padding-left: 6px;
        margin-left: 2px;
    }

    

    .glass-panel {
        padding: 4px 8px;
        min-width: auto;
    }

    /* Fixed datetime display */
    .datetime-display {
        font-size: 10px;
        line-height: 1.3;
        text-align: right;
        white-space: nowrap;
    }

    .datetime-date {
        font-size: 9px;
        color: #e5e7eb;
        text-transform: uppercase;
        display: block;
    }

    .datetime-time {
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.5px;
        display: block;
    }

    /* Hide floating tags on mobile */
    .floating-tag {
        display: none !important;
    }

    /* --- TOOLBAR MOBILE LAYOUT - FIXED --- */
    .toolbar {
        flex-direction: column;
        padding: 6px 8px;
        gap: 6px;
    }

    /* Line 1: File tabs - FIXED */
    .file-tabs {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .file-tabs::-webkit-scrollbar {
        display: none;
    }

    .file-tab {
        flex: 1 1 auto;
        min-width: 0;
        padding: 8px 6px;
        font-size: 11px;
        gap: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .file-tab i {
        font-size: 12px;
        flex-shrink: 0;
    }

    /* Hide text, show only icons on very small screens */
    .file-tab span:not(.tab-copy-btn) {
        display: none;
    }

    .file-tab::before {
        content: attr(data-short);
        font-size: 10px;
    }

    .html-tab::before { content: "HTML"; }
    .css-tab::before { content: "CSS"; }
    .js-tab::before { content: "JS"; }

    .tab-copy-btn {
        margin-left: 2px;
        padding: 2px 4px;
        font-size: 10px;
    }

    .clear-all-btn {
        margin-left: 4px;
        padding: 8px 8px;
        font-size: 11px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .clear-all-btn span {
        display: none;
    }

    /* Line 2: Action buttons - FIXED */
    .action-buttons {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .btn {
        flex: 1 1 auto;
        padding: 8px 6px;
        font-size: 11px;
        gap: 4px;
        white-space: nowrap;
        min-width: 0;
    }

    .btn i {
        font-size: 12px;
    }

    .btn-run {
        flex: 1.5;
        background: #10b981;
    }

    .btn-theme {
        flex: 1;
        padding: 8px 6px;
    }

    /* Smaller icon buttons */
    .btn-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 12px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu-container {
        position: relative;
        flex-shrink: 0;
    }

    .menu-dropdown {
        right: 0;
        left: auto;
        min-width: 140px;
        position: absolute;
        top: 100%;
        margin-top: 4px;
    }

    .menu-item {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* --- COMPILER WRAPPER MOBILE --- */
    .compiler-wrapper {
        height: auto;
        min-height: calc(100vh - 180px);
        flex-direction: column;
    }

    .main-container {
        flex-direction: column;
        height: auto;
    }

    /* Editor section */
    .editor-section {
        width: 100% !important;
        min-width: unset !important;
        max-width: unset !important;
        height: 50vh;
        min-height: 200px;
        border-right: none;
        border-bottom: 2px solid #334155;
        order: 1;
    }

    /* Hide resizer on mobile */
    .resizer {
        display: none !important;
    }

    /* Preview section */
    .preview-section {
        width: 100% !important;
        min-width: unset !important;
        max-width: unset !important;
        height: 50vh;
        min-height: 200px;
        order: 2;
        display: none;
    }

    .preview-section.mobile-preview-active {
        display: flex;
    }

    .preview-header {
        padding: 8px 12px;
    }

    .preview-title {
        font-size: 12px;
    }

    /* Mobile phone frame */
    .phone-frame {
        width: 260px;
        height: 520px;
        padding: 8px;
    }

    .phone-branding {
        font-size: 10px;
        margin-top: 8px;
    }

    /* --- SEO CONTENT MOBILE --- */
    .seo-content-section {
        padding: 20px 12px;
    }

    .seo-block {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .seo-block h1 {
        font-size: 20px;
        line-height: 1.3;
    }

    .seo-block h2 {
        font-size: 17px;
        line-height: 1.3;
    }

    .seo-block h3 {
        font-size: 15px;
        padding-bottom: 8px;
        margin: 16px 0 12px;
    }

    .seo-block h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .seo-block p {
        font-size: 13px;
        line-height: 1.7;
        margin-bottom: 12px;
    }

    .seo-lead {
        font-size: 14px;
        line-height: 1.8;
    }

    .code-example {
        padding: 10px;
        margin: 10px 0;
    }

    .code-example h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .code-example pre {
        padding: 10px;
    }

    .code-example code {
        font-size: 10px;
    }

    /* Fundamentals grid */
    .fundamentals-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 12px;
    }

    .fundamental-card {
        padding: 12px;
    }

    .fundamental-card h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .fundamental-card p {
        font-size: 12px;
    }

    /* Tags table */
    .tags-table-container {
        margin-top: 12px;
        overflow-x: auto;
    }

    .tags-table {
        font-size: 11px;
        min-width: 500px;
    }

    .tags-table th,
    .tags-table td {
        padding: 8px 6px;
    }

    /* Box model diagram */
    .box-model-diagram {
        margin: 20px auto;
        max-width: 100%;
    }

    .box-margin {
        padding: 15px;
    }

    .box-border {
        padding: 12px;
    }

    .box-padding {
        padding: 12px;
    }

    .box-content {
        padding: 8px;
    }

    .box-content p {
        font-size: 11px;
    }

    .box-label {
        font-size: 10px;
        padding: 2px 8px;
        top: -10px;
    }

    /* Step list */
    .step-list {
        gap: 12px;
        margin-top: 12px;
    }

    .step-item {
        flex-direction: row;
        gap: 12px;
        align-items: flex-start;
    }

    .step-number {
        min-width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .step-content h4 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .step-content p {
        font-size: 12px;
    }

    /* Grids */
    .features-grid,
    .tips-grid,
    .usecases-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 16px;
    }

    .feature-card,
    .tip-item,
    .usecase-card {
        padding: 12px;
    }

    .feature-icon,
    .usecase-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .feature-card h4,
    .usecase-card h4 {
        font-size: 14px;
        margin: 8px 0;
    }

    .feature-card p,
    .usecase-card p {
        font-size: 12px;
    }

    /* Highlight block */
    .highlight-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
    }

    .highlight-badge {
        font-size: 9px;
        padding: 4px 10px;
    }

    .highlight-text {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .feature-list li {
        font-size: 12px;
        padding: 6px 0;
        flex-direction: column;
        gap: 4px;
    }

    .feature-list li strong {
        min-width: auto;
    }

    /* Best practices */
    .best-practices-content {
        gap: 12px;
        margin-top: 12px;
    }

    .practice-section {
        padding: 12px;
    }

    .practice-section h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .practice-section p {
        font-size: 12px;
    }

    /* FAQ */
    .faq-item {
        margin: 8px 0;
    }

    .faq-item summary {
        padding: 12px 14px;
        font-size: 13px;
    }

    .faq-item summary:after {
        font-size: 18px;
    }

    .faq-item p {
        padding: 12px 14px;
        font-size: 12px;
    }

    /* CTA Block */
    .cta-block {
        padding: 20px 16px;
    }

    .cta-text {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .btn-cta {
        padding: 12px 24px;
        font-size: 14px;
    }

    .cta-note {
        flex-direction: column;
        gap: 6px;
        font-size: 11px;
        margin-top: 16px;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        gap: 12px;
        padding: 0 10px;
    }

    .footer-left {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .footer-link {
        font-size: 12px;
    }

    .footer-divider {
        font-size: 12px;
    }

    .footer-right {
        justify-content: center;
        gap: 8px;
    }

    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .footer-bottom {
        margin-top: 12px;
        padding-top: 12px;
    }

    .footer-bottom p {
        font-size: 11px;
    }

    /* Modal */
    .modal-content {
        width: 92%;
        padding: 16px;
        margin: 10px;
    }

    .modal-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .modal-title {
        font-size: 15px;
    }

    .setting-item {
        margin-bottom: 16px;
    }

    /* Toast */
    .toast {
        padding: 10px 16px;
        font-size: 12px;
        bottom: 12px;
    }

    /* CodeMirror mobile fixes */
    .CodeMirror {
        font-size: 12px !important;
    }
}

/* ===== EXTRA SMALL MOBILE DEVICES ===== */
@media (max-width: 380px) {
    .top-bar {
        height: 55px;
        padding: 0 8px;
    }

    .logo-main {
        font-size: 16px;
    }

    .logo-sub {
        font-size: 11px;
        padding-left: 4px;
        margin-left: 2px;
    }

    .datetime-display {
        font-size: 9px;
    }

    .datetime-date {
        font-size: 8px;
    }

    .datetime-time {
        font-size: 11px;
    }

    .file-tab {
        padding: 6px 4px;
        font-size: 10px;
    }

    .file-tab i {
        font-size: 10px;
    }

    .clear-all-btn {
        padding: 6px 6px;
    }

    .btn {
        padding: 6px 4px;
        font-size: 10px;
    }

    .btn i {
        font-size: 10px;
    }

    .btn-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 10px;
    }

    .editor-section,
    .preview-section {
        min-height: 180px;
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-height: 500px) and (max-width: 768px) {
    .editor-section,
    .preview-section {
        height: 45vh;
        min-height: 160px;
    }

    .top-bar {
        height: 50px;
    }

    .toolbar {
        padding: 4px 8px;
        gap: 4px;
    }
}

/* Additional mobile fixes for tabs */
@media (max-width: 768px) {
    .file-tab .tab-text {
        display: none;
    }

    .file-tab {
        justify-content: center;
        align-items: center;
    }

    /* Show short text via ::after pseudo element */
    .file-tab.html-tab::after {
        content: "HTML";
        font-size: 10px;
        margin-left: 4px;
    }

    .file-tab.css-tab::after {
        content: "CSS";
        font-size: 10px;
        margin-left: 4px;
    }

    .file-tab.js-tab::after {
        content: "JS";
        font-size: 10px;
        margin-left: 4px;
    }

    /* Hide the data-short approach and use this instead */
    .file-tab::before {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .file-tab.html-tab::after,
    .file-tab.css-tab::after,
    .file-tab.js-tab::after {
        font-size: 9px;
    }

    .file-tab i {
        font-size: 11px;
    }
}