/* =======================================================
   💎 SERP SIMULATOR - ULTRA-PRO EXPERT CSS
   ======================================================= */
:root {
    --primary: #2563eb;
    --dark: #0f172a;
    --border: #e2e8f0;
    --google-blue: #1a0dab;
    --google-gray: #4d5156;
}

.dw-saas-wrap { 
    max-width: 1250px; 
    margin: 40px auto; 
    padding: 0 20px; 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    color: #334155;
}

.text-gradient { 
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    font-weight: 800; 
}

/* 🚀 HEADER */
.dw-saas-header { text-align: center; margin-bottom: 40px; }
.dw-saas-chip { 
    display: inline-block; padding: 6px 16px; background: #eff6ff; 
    color: var(--primary); border-radius: 100px; font-size: 12px; 
    font-weight: 700; margin-bottom: 12px; 
}

/* 🚀 LAYOUT GRID (Expert Responsive System) */
.dw-main-grid { 
    display: grid; 
    grid-template-columns: 420px 1fr; /* Desktop: Side-by-Side */
    gap: 30px; 
    align-items: start;
}

/* 🛡️ CARDS & INPUTS */
.dw-card { 
    background: #fff; padding: 30px; border-radius: 24px; 
    border: 1px solid var(--border); box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
}
.dw-card-h { font-weight: 800; font-size: 18px; margin-bottom: 20px; color: var(--dark); }

.dw-field { margin-bottom: 20px; }
.dw-field-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.dw-count { color: #94a3b8; }

.dw-field-input { 
    width: 100% !important; padding: 12px; border: 1px solid var(--border); 
    border-radius: 12px; font-size: 15px; outline: none; box-sizing: border-box; 
    transition: 0.3s; color: #000;
}
.dw-field-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }

/* 🛑 NO-RESIZE POLICY */
textarea.dw-field-input { resize: none !important; height: 110px; }

/* Progress Bars */
.dw-bar-bg { width: 100%; height: 5px; background: #f1f5f9; border-radius: 10px; margin-top: 8px; overflow: hidden; }
.dw-bar { height: 100%; width: 0%; background: #22c55e; transition: 0.3s; }
.dw-bar.warning { background: #eab308; }
.dw-bar.danger { background: #ef4444; }

/* 🖥️ PREVIEW AREA */
.dw-preview-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dw-toggle { display: flex; background: #e2e8f0; padding: 4px; border-radius: 12px; }
.dw-toggle-btn { 
    border: none; padding: 8px 18px; border-radius: 10px; 
    font-weight: 700; cursor: pointer; color: #64748b; 
    background: transparent; transition: 0.3s; font-size: 13px;
}
.dw-toggle-btn.active { background: #fff; color: var(--primary); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

#google-window { 
    background: #fff; padding: 35px; border-radius: 20px; 
    border: 1px solid var(--border); transition: 0.3s; min-height: 180px; 
}
.preview-mobile { max-width: 380px !important; margin: 0 auto; padding: 25px 15px !important; }

/* Google Search Styling */
.g-favicon { width: 18px; height: 18px; background: #f1f3f4; border-radius: 50%; display: inline-block; margin-right: 10px; }
.g-url-row { display: flex; align-items: center; font-size: 14px; color: #202124; margin-bottom: 8px; }
#p-title { color: var(--google-blue); font-size: 20px; margin: 0 0 5px 0; font-weight: 400; line-height: 1.3; cursor: pointer; }
#p-desc { color: var(--google-gray); font-size: 14px; line-height: 1.58; margin: 0; }

.preview-mobile #p-title { font-size: 18px; color: #1967d2; }
.dw-pro-stats { margin-top: 25px; display: flex; gap: 20px; font-size: 12px; font-weight: 700; color: #94a3b8; }

/* 🛡️ BULLETPROOF MEDIA QUERIES (THE FULL FIX) */
@media screen and (max-width: 1024px) {
    .dw-main-grid { 
        grid-template-columns: 1fr; /* Stack vertically */
    }
    
    .dw-config-card {
        order: 1; /* Input pehle aayega */
    }
    
    .dw-preview-card {
        order: 2; /* Preview niche aayega */
        margin-top: 20px;
    }
}

@media screen and (max-width: 768px) {
    .dw-saas-header h1 { font-size: 32px; }
    .dw-preview-h { flex-direction: column; gap: 15px; text-align: center; }
}

@media screen and (max-width: 480px) {
    .dw-saas-wrap { padding: 0 15px; }
    #google-window { padding: 20px 15px; }
    #p-title { font-size: 17px; }
    .dw-pro-stats { flex-direction: column; align-items: center; gap: 8px; }
}