/* Mobile Analyzer - Ultra Optimized CSS */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'Segoe UI',sans-serif;line-height:1.6;color:#333;background:linear-gradient(135deg,#667eea,#764ba2);min-height:100vh}
.container{max-width:1200px;margin:0 auto;padding:0 1rem}

/* Header */
.site-header{background:rgba(255,255,255,.95);backdrop-filter:blur(10px);box-shadow:0 4px 20px rgba(0,0,0,.1);position:sticky;top:0;z-index:1000;border-bottom:2px solid rgba(229,50,45,.1)}
.header-content{display:flex;justify-content:space-between;align-items:center;padding:1rem 0}
.logo a{display:flex;align-items:center;text-decoration:none;color:#333;font-size:1.5rem;font-weight:700}
.logo img{height:40px;margin-right:.5rem}
.main-nav ul{display:flex;list-style:none;gap:2rem}
.main-nav a{text-decoration:none;color:#333;font-weight:500;transition:color .3s}
.main-nav a:hover{color:#e5322d}
.mobile-menu-btn{display:none;background:0;border:0;font-size:1.5rem;cursor:pointer;color:#333}

/* Hero */
.hero-section{padding:3rem 0;text-align:center;color:#fff}
.hero-content h1{font-size:2.5rem;font-weight:700;margin-bottom:1rem;text-shadow:0 2px 4px rgba(0,0,0,.3)}
.hero-subtitle{font-size:1.2rem;margin-bottom:2rem;text-shadow:0 1px 2px rgba(0,0,0,.3);max-width:600px;margin-left:auto;margin-right:auto}

/* Forms */
.analyzer-tool{max-width:800px;margin:0 auto}
.form-container{display:flex;flex-direction:column;align-items:center;background:rgba(255,255,255,.95);padding:2rem;border-radius:20px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);gap:1rem}
.form-container input,.form-container select{width:100%;padding:1rem;border:2px solid #e0e0e0;border-radius:12px;font-size:1.1rem;background:rgba(255,255,255,.9);transition:all .3s}
.form-container input:focus,.form-container select:focus{outline:0;border-color:#e5322d;box-shadow:0 0 0 3px rgba(229,50,45,.1)}
.form-container button{background:linear-gradient(135deg,#e5322d,#c62828);color:#fff;font-weight:600;padding:1rem 2rem;border:0;border-radius:12px;font-size:1.2rem;cursor:pointer;transition:all .3s;width:100%;text-transform:uppercase;letter-spacing:.5px;box-shadow:0 4px 15px rgba(229,50,45,.3)}
.form-container button:hover{transform:translateY(-2px);box-shadow:0 8px 25px rgba(229,50,45,.4)}
.disclaimer{text-align:center;font-size:.95rem;color:rgba(255,255,255,.9);font-weight:500;margin-top:1rem;padding:1rem;background:rgba(229,50,45,.1);border-radius:10px;backdrop-filter:blur(5px)}

/* Performance */
.performance-section{background:rgba(255,255,255,.95);margin:2rem auto;padding:2rem;border-radius:20px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);text-align:center;display:none;max-width:800px}
.performance-title{font-size:1.4rem;font-weight:700;color:#333;margin-bottom:1.5rem}
.performance-metrics{display:flex;justify-content:space-around;align-items:center;gap:2rem;flex-wrap:wrap}
.performance-circle{width:100px;height:100px;border-radius:50%;position:relative;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.2rem;color:#fff;background:conic-gradient(var(--progress-color) var(--progress-percent),#e0e0e0 0)}
.performance-circle::before{content:'';position:absolute;inset:10px;border-radius:50%;background:#fff}
.performance-score{position:relative;z-index:1;color:var(--progress-color);font-weight:700}
.performance-details{flex:1;text-align:left}
.performance-time{font-size:1.1rem;font-weight:600;margin-bottom:.5rem;color:#333}
.performance-status{font-size:.9rem;font-weight:500;padding:.4rem 1rem;border-radius:25px;display:inline-block;margin-bottom:.5rem}
.status-excellent{background:linear-gradient(135deg,#4caf50,#45a049);color:#fff}
.status-good{background:linear-gradient(135deg,#ff9800,#f57c00);color:#fff}
.status-poor{background:linear-gradient(135deg,#f44336,#d32f2f);color:#fff}
.status-average{background:linear-gradient(135deg,#2196f3,#1976d2);color:#fff}
.performance-description{font-size:.8rem;color:#666;line-height:1.4}

/* Preview - FIXED SPACING */
.preview-section{display:none;flex-direction:column;align-items:center;gap:2rem;margin:2rem auto;max-width:1200px;text-align:center}
.control-panel{background:rgba(255,255,255,.95);padding:1.5rem;border-radius:15px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);display:flex;flex-wrap:wrap;gap:1rem;justify-content:center;align-items:center;width:100%;max-width:1000px;margin:0 auto 2rem auto}
.control-btn{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:0;padding:.8rem 1.5rem;border-radius:10px;font-size:.9rem;font-weight:600;cursor:pointer;transition:all .3s;display:flex;align-items:center;gap:.5rem;text-transform:uppercase;letter-spacing:.3px;box-shadow:0 4px 15px rgba(102,126,234,.3)}
.control-btn:hover{transform:translateY(-2px);box-shadow:0 8px 25px rgba(102,126,234,.4)}
.control-btn.active{background:linear-gradient(135deg,#e5322d,#c62828);box-shadow:0 4px 15px rgba(229,50,45,.3)}
.device-info{display:flex;align-items:center;justify-content:center;gap:1rem;font-size:.9rem;color:#666;font-weight:500;flex-wrap:wrap}
.orientation-badge{background:linear-gradient(135deg,#4caf50,#45a049);color:#fff;padding:.3rem .8rem;border-radius:20px;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.3px}
.orientation-badge.landscape{background:linear-gradient(135deg,#ff9800,#f57c00)}
.zoom-controls{display:flex;align-items:center;justify-content:center;gap:.5rem;background:rgba(255,255,255,.1);padding:.5rem;border-radius:10px}
.zoom-level{font-weight:700;color:#333;min-width:60px;text-align:center;font-size:.9rem}

/* Feedback - FIXED SPACING */
.user-feedback-section{background:rgba(255,255,255,.95);padding:1.5rem;border-radius:15px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);text-align:center;display:none;width:100%;max-width:800px;margin:0 auto 2rem auto}
.feedback-question{font-size:1.1rem;font-weight:600;color:#333;margin-bottom:1.5rem;text-align:center}
.feedback-buttons{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap;align-items:center}
.feedback-btn{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:0;padding:.8rem 2rem;border-radius:10px;font-size:1rem;font-weight:600;cursor:pointer;transition:all .3s;min-width:180px}
.feedback-btn:hover{transform:translateY(-2px);box-shadow:0 8px 25px rgba(102,126,234,.4)}
.feedback-btn.yes{background:linear-gradient(135deg,#e5322d,#c62828)}
.feedback-btn.no{background:linear-gradient(135deg,#4caf50,#45a049)}

/* Preview Container - ZOOM FIXES APPLIED */
.preview-container{position:relative;border-radius:20px;overflow:hidden;background:#000;box-shadow:0 20px 60px rgba(0,0,0,.3);transition:all .5s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center;margin:0 auto}
.preview-wrapper{position:relative;overflow:hidden;border-radius:20px;transition:all .3s ease;background:#fff}
iframe{border:0;width:100%;height:100%;display:block;transition:transform .3s ease;transform-origin:top left;background:#fff}
.loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,.9);display:flex;align-items:center;justify-content:center;z-index:100;transition:opacity .3s}
.loading-spinner{width:50px;height:50px;border:4px solid #f3f3f3;border-top:4px solid #e5322d;border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}

/* FULLSCREEN ZOOM SUPPORT */
.preview-container:fullscreen,.preview-container:-webkit-full-screen,.preview-container:-moz-full-screen{width:100vw!important;height:100vh!important;display:flex;align-items:center;justify-content:center;background:#000;border-radius:0}
.preview-container:fullscreen .preview-wrapper,.preview-container:-webkit-full-screen .preview-wrapper,.preview-container:-moz-full-screen .preview-wrapper{max-width:90vw;max-height:90vh;border-radius:20px;box-shadow:0 20px 60px rgba(255,255,255,.1)}

/* Recent Analyses - FIXED GRID LAYOUT */



/* Recent Analyses */
.recent-analyses-section{background:rgba(255,255,255,.95);margin:3rem auto;padding:3rem 2rem;border-radius:20px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);max-width:1200px}
.recent-analyses-section h2{text-align:center;font-size:2rem;font-weight:700;color:#333;margin-bottom:1rem}
.section-subtitle{text-align:center;font-size:1.1rem;color:#666;margin-bottom:2rem;max-width:600px;margin-left:auto;margin-right:auto}
.analyses-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:1.5rem;margin-bottom:2rem;max-width:1200px;margin-left:auto;margin-right:auto}
.analysis-card{background:#fff;border-radius:15px;padding:1.5rem;box-shadow:0 4px 15px rgba(0,0,0,.1);transition:all .3s;border:1px solid rgba(229,50,45,.1);width:100%;max-width:350px;min-width:280px;flex:1 1 300px}
.analysis-card:hover{transform:translateY(-5px);box-shadow:0 8px 25px rgba(0,0,0,.15)}
.card-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem;gap:1rem}
.card-header h3{font-size:1.1rem;font-weight:600;margin:0}
.card-header h3 a{color:#333;text-decoration:none;transition:color .3s}
.card-header h3 a:hover{color:#e5322d}
.score-badge{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:.3rem .8rem;border-radius:20px;font-size:.8rem;font-weight:600;white-space:nowrap}
.score-badge.score-excellent{background:linear-gradient(135deg,#4caf50,#45a049)}
.score-badge.score-good{background:linear-gradient(135deg,#ff9800,#f57c00)}
.score-badge.score-poor{background:linear-gradient(135deg,#f44336,#d32f2f)}
.score-badge.score-average{background:linear-gradient(135deg,#2196f3,#1976d2)}
.card-meta{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-bottom:1rem}
.meta-item{display:flex;flex-direction:column;gap:.2rem}
.meta-item .label{font-size:.8rem;color:#666;font-weight:500}
.meta-item .value{font-size:.9rem;color:#333;font-weight:600}
.card-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.view-report-btn,.test-again-btn{flex:1;min-width:120px;padding:.6rem 1rem;border-radius:8px;text-decoration:none;font-size:.85rem;font-weight:600;text-align:center;transition:all .3s;display:inline-block}
.view-report-btn{background:linear-gradient(135deg,#e5322d,#c62828);color:#fff}
.view-report-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(229,50,45,.3)}
.test-again-btn{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}
.test-again-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(102,126,234,.3)}
.view-more-section{text-align:center;color:#666;font-style:italic}

/* Features */
.features-section{background:rgba(255,255,255,.95);margin:3rem auto;padding:3rem 2rem;border-radius:20px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);max-width:1200px}
.features-section h2{text-align:center;font-size:2rem;font-weight:700;color:#333;margin-bottom:2rem}
.features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:2rem}
.feature-card{text-align:center;padding:2rem 1rem;background:#fff;border-radius:15px;box-shadow:0 4px 15px rgba(0,0,0,.1);transition:transform .3s}
.feature-card:hover{transform:translateY(-5px)}
.feature-icon{font-size:3rem;margin-bottom:1rem}
.feature-card h3{font-size:1.3rem;font-weight:600;color:#333;margin-bottom:1rem}
.feature-card p{color:#666;line-height:1.6}

/* Footer */
.site-footer{background:rgba(255,255,255,.95);backdrop-filter:blur(10px);padding:2rem;text-align:center;font-size:.9rem;color:#666;border-top:2px solid rgba(229,50,45,.1);line-height:1.6}
.site-footer strong{color:#333}

/* ENHANCED: Progress Colors - ADDED */
:root{--status-excellent:#4CAF50;--status-good:#FF9800;--status-average:#2196F3;--status-poor:#f44336}
.performance-circle[data-status="excellent"]{--progress-color:var(--status-excellent)}
.performance-circle[data-status="good"]{--progress-color:var(--status-good)}
.performance-circle[data-status="average"]{--progress-color:var(--status-average)}
.performance-circle[data-status="poor"]{--progress-color:var(--status-poor)}

/* Single button styling - IMPROVED */
.view-report-btn.single-btn{flex:1;min-width:200px;max-width:300px;padding:.8rem 1.5rem;border-radius:10px;text-decoration:none;font-size:1rem;font-weight:600;text-align:center;transition:all .3s ease;display:inline-block;background:linear-gradient(135deg,#e5322d,#c62828);color:#fff;box-shadow:0 4px 15px rgba(229,50,45,.3)}
.view-report-btn.single-btn:hover{transform:translateY(-2px);box-shadow:0 8px 25px rgba(229,50,45,.4)}

/* Tab Interface */
.info-tabs-container{background:rgba(55,55,55,.95);margin:2rem auto;padding:0;border-radius:20px;box-shadow:0 8px 32px rgba(0,0,0,.1);backdrop-filter:blur(10px);max-width:800px;overflow:hidden}
.info-tabs-header{display:flex;background:rgba(102,126,234,.1);border-bottom:1px solid rgba(229,50,45,.1)}
.info-tab-btn{flex:1;padding:1rem 2rem;background:0;border:0;font-size:1rem;font-weight:600;color:#666;cursor:pointer;transition:all .3s;border-bottom:3px solid transparent}
.info-tab-btn.active{color:#e5322d;background:rgba(229,50,45,.05);border-bottom-color:#e5322d}
.info-tab-btn:hover{background:rgba(229,50,45,.05);color:#e5322d}
.info-tab-content{display:none;padding:2rem;text-align:center}
.info-tab-content.active{display:block}
.info-grid{display:grid;grid-template-columns:auto 1fr;gap:.5rem 1rem;margin-top:.5rem;text-align:left;max-width:600px;margin-left:auto;margin-right:auto}
.ssl-error{color:#f44336;font-weight:600;display:flex;align-items:center;gap:.5rem}
.ssl-success{color:#4CAF50;font-weight:600;display:flex;align-items:center;gap:.5rem}

/* Loading animation for performance circle */
@keyframes pulse{0%{opacity:.6}50%{opacity:1}100%{opacity:.6}}
.performance-circle.loading{animation:pulse 1.5s ease-in-out infinite}
.performance-circle.loading::before{background:conic-gradient(#e0e0e0 0deg,#e0e0e0 360deg)}

/* Grid layout improvements for exactly 9 items */
@media (min-width:1200px){
.analyses-grid{justify-content:center;max-width:1100px}
.analysis-card{flex:0 1 320px;max-width:320px}
}

@media (min-width:992px) and (max-width:1199px){
.analyses-grid{justify-content:center;max-width:900px}
.analysis-card{flex:0 1 300px;max-width:300px}
}

@media (min-width:768px) and (max-width:991px){
.analyses-grid{justify-content:center;max-width:700px}
.analysis-card{flex:0 1 320px;max-width:320px}
}

@media (max-width:767px){
.analyses-grid{justify-content:center;max-width:400px}
.analysis-card{flex:0 1 100%;max-width:350px;min-width:280px}
}

/* Responsive - IMPROVED MOBILE SPACING */
@media (min-width:768px){
.form-container{flex-direction:row;justify-content:center;gap:1rem;align-items:end}
.form-container input,.form-container select{width:auto;flex:1;margin-bottom:0}
.form-container button{width:auto;flex:0 0 auto}
.control-panel{flex-direction:row;justify-content:space-between}
.performance-metrics{flex-wrap:nowrap}
}
@media (max-width:768px){
.header-content{flex-wrap:wrap}
.mobile-menu-btn{display:block;order:3}
.main-nav{order:4;width:100%;display:none;margin-top:1rem}
.main-nav.active{display:block}
.main-nav ul{flex-direction:column;gap:1rem;background:rgba(255,255,255,.95);padding:1rem;border-radius:10px;box-shadow:0 4px 15px rgba(0,0,0,.1)}
.hero-content h1{font-size:2rem}
.preview-section{gap:1.5rem;margin:1.5rem auto}
.control-panel{flex-direction:column;gap:1rem;margin-bottom:1.5rem}
.control-btn{width:100%;justify-content:center;max-width:280px}
.user-feedback-section{margin:0 auto 1.5rem auto}
.feedback-buttons{flex-direction:column;align-items:center;gap:.8rem}
.feedback-btn{max-width:280px;width:100%}
.device-info{justify-content:center;text-align:center}
.performance-metrics{flex-direction:column;gap:1rem}
.performance-details{text-align:center}
.analyses-grid{grid-template-columns:1fr;gap:1rem}
.features-grid{grid-template-columns:1fr}
.card-actions{flex-direction:column}
.view-report-btn,.test-again-btn{min-width:auto}
.view-report-btn.single-btn{min-width:auto;width:100%}
}
@media (max-width:480px){
.hero-content h1{font-size:1.8rem;padding:1rem}
.hero-subtitle{font-size:1.1rem}
.form-container,.performance-section{padding:1.5rem}
.recent-analyses-section,.features-section{padding:2rem 1rem}
.preview-section{gap:1rem;margin:1rem auto}
.control-panel,.user-feedback-section{padding:1rem}
.feedback-question{font-size:1rem;margin-bottom:1rem}
}
