/* styles.css - Business Intelligence Platform - OPTIMIZED */
*{margin:0;padding:0;box-sizing:border-box;font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif}
body{background-color:#f8f9fa;color:#333;line-height:1.6}
body.modal-open{overflow:hidden}
.container{max-width:1200px;margin:0 auto;padding:0 20px}

/* Header */
header{background:linear-gradient(135deg,#1e3c72 0%,#2a5298 100%);color:white;padding:60px 0;text-align:center}
header h1{font-size:2.5rem;margin-bottom:15px;font-weight:700}
header p{font-size:1.2rem;max-width:700px;margin:0 auto;opacity:.9}

/* Hero Stats */
.hero-stats{display:flex;justify-content:center;gap:3rem;margin-top:2rem}
.stat{text-align:center}
.stat-number{font-size:2rem;font-weight:700;color:white;margin-bottom:.5rem}
.stat-label{color:rgba(255,255,255,.8);font-size:.9rem}

/* Search Section */
.search-section{background-color:white;padding:40px 0;box-shadow:0 4px 6px rgba(0,0,0,.05)}
.search-section h2{text-align:center;margin-bottom:30px;color:#2a5298;font-weight:600}
.search-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:15px;max-width:900px;margin:0 auto}
.form-group{display:flex;flex-direction:column}
.form-group label{margin-bottom:8px;font-weight:500;color:#555}
.form-group input,.form-group select{padding:12px 15px;border:1px solid #ddd;border-radius:4px;font-size:1rem;transition:border-color .3s}
.form-group input:focus,.form-group select:focus{outline:none;border-color:#2a5298;box-shadow:0 0 0 2px rgba(42,82,152,.2)}
.form-group small{display:block;margin-top:.25rem;color:#6b7280;font-size:.8rem}
.search-button{grid-column:1/-1;background-color:#2a5298;color:white;border:none;padding:14px;border-radius:4px;font-size:1.1rem;font-weight:600;cursor:pointer;transition:background-color .3s;margin-top:10px}
.search-button:hover{background-color:#1e3c72}

/* Search Credits */
.search-credits{display:flex;align-items:center;gap:.5rem;background:#f0f9ff;padding:.5rem 1rem;border-radius:10px;color:#0369a1;font-size:.9rem;margin-top:1rem;justify-content:center}

/* Features */
.features-section{padding:80px 0;background-color:#f8f9fa}
.features-section h2{text-align:center;margin-bottom:50px;color:#2a5298;font-weight:600}
.features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:30px}
.feature-card{background-color:white;border-radius:8px;padding:30px;box-shadow:0 5px 15px rgba(0,0,0,.05);text-align:center;transition:transform .3s,box-shadow .3s}
.feature-card:hover{transform:translateY(-5px);box-shadow:0 10px 25px rgba(0,0,0,.1)}
.feature-icon{font-size:2.5rem;color:#2a5298;margin-bottom:20px}
.feature-card h3{font-size:1.5rem;margin-bottom:15px;color:#333}
.feature-card p{color:#666}

/* User Menu */
.user-menu-trigger{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:#f8fafc;border-radius:10px;text-decoration:none;color:#374151;transition:all .3s;border:1px solid #e5e7eb}
.user-menu-trigger:hover{background:#e5e7eb}
.user-dropdown{display:none;position:absolute;top:100%;right:0;background:white;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.1);padding:1rem;min-width:200px;z-index:1000;border:1px solid #e5e7eb}
.user-info{padding-bottom:.5rem;border-bottom:1px solid #e5e7eb;margin-bottom:.5rem}
.user-info strong{display:block;color:#1f2937;margin-bottom:.5rem}
.user-plan{font-size:.8rem;padding:.2rem .5rem;border-radius:15px;background:#e0e7ff;color:#4f46e5;display:inline-block}
.user-plan.free{background:#f3f4f6;color:#6b7280}
.user-plan.premium{background:#fef3c7;color:#d97706}
.user-plan.enterprise{background:#fce7f3;color:#db2777}
.credits-info{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem;font-size:.9rem;color:#6b7280}
.btn{display:inline-block;padding:.75rem 1.5rem;background:#4f46e5;color:white;border:none;border-radius:6px;text-decoration:none;font-weight:500;cursor:pointer;transition:background-color .3s;text-align:center}
.btn:hover{background:#4338ca}
.btn-sm{padding:.4rem .8rem;font-size:.8rem}
.btn-block{width:100%;display:block}
.btn:disabled{opacity:.6;cursor:not-allowed}

/* User Status */
.user-status-bar{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:white;padding:1rem;border-radius:10px;margin-bottom:2rem}
.status-content{display:flex;justify-content:space-between;align-items:center}
.user-welcome{font-size:1.1rem}
.plan-badge{font-size:.8rem;padding:.2rem .8rem;border-radius:15px;margin-left:.5rem;background:rgba(255,255,255,.2)}
.credits-display{display:flex;align-items:center;gap:.5rem;background:rgba(255,255,255,.1);padding:.5rem 1rem;border-radius:20px}

/* Auth Modal */
.auth-tabs{display:flex;gap:.5rem;margin-bottom:1.5rem;border-bottom:1px solid #e5e7eb}
.tab-btn{padding:.75rem 1.5rem;background:none;border:none;color:#6b7280;cursor:pointer;border-bottom:2px solid transparent;transition:all .3s}
.tab-btn.active{color:#4f46e5;border-bottom-color:#4f46e5}
.auth-tab-content{margin-bottom:1.5rem}
.auth-features{background:#f8fafc;padding:1rem;border-radius:10px;margin-top:1.5rem}
.auth-features h4{margin-bottom:.5rem;color:#374151}
.auth-features ul{list-style:none;padding:0}
.auth-features li{padding:.3rem 0;color:#6b7280}

/* API Key Modal */
.api-key-success{text-align:center}
.api-key-display{background:#1f2937;color:#10b981;padding:1rem;border-radius:10px;margin:1rem 0;display:flex;justify-content:space-between;align-items:center;font-family:monospace;word-break:break-all}
.user-details{text-align:left;background:#f8fafc;padding:1rem;border-radius:10px;margin:1rem 0}
.user-details p{margin:.5rem 0}

/* Upgrade Modal */
.current-plan-card{background:#f0f9ff;padding:1rem;border-radius:10px;margin-bottom:1.5rem;text-align:center}
.plan-free{color:#6b7280}.plan-premium{color:#d97706}.plan-enterprise{color:#db2777}

/* Notification System */
.notification{position:fixed;top:20px;right:20px;z-index:10000;min-width:300px;max-width:500px;animation:slideInRight .3s ease-out}
.notification-content{display:flex;align-items:center;gap:.75rem;padding:1rem 1.5rem;border-radius:10px;box-shadow:0 10px 25px rgba(0,0,0,.1);color:white;font-weight:500}
.notification-success{background:linear-gradient(135deg,#10b981,#059669)}
.notification-error{background:linear-gradient(135deg,#ef4444,#dc2626)}
.notification-info{background:linear-gradient(135deg,#3b82f6,#2563eb)}
.notification-warning{background:linear-gradient(135deg,#f59e0b,#d97706)}
.notification-content button{background:none;border:none;color:white;font-size:1.2rem;cursor:pointer;margin-left:auto;opacity:.7;transition:opacity .3s}
.notification-content button:hover{opacity:1}

/* Animations */
@keyframes slideInRight{from{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}
@keyframes fa-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
.fa-spin{animation:fa-spin 1s infinite linear}

/* Modal Styles - FIXED SCROLLING */
.modal{display:none;position:fixed;z-index:1000;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);overflow:hidden}
.modal-content{background-color:#fefefe;margin:5% auto;padding:20px;border:1px solid #888;width:90%;max-width:500px;border-radius:10px;position:relative;max-height:85vh;overflow-y:auto;overflow-x:hidden}
.close-modal{color:#aaa;float:right;font-size:28px;font-weight:700;cursor:pointer;background:none;border:none;position:absolute;right:15px;top:15px}
.close-modal:hover,.close-modal:focus{color:#000}

/* Business Cards */
.business-card{background:white;border-radius:10px;padding:1.5rem;margin-bottom:1rem;box-shadow:0 2px 10px rgba(0,0,0,.1);border:1px solid #e5e7eb}
.business-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.5rem}
.business-name{font-size:1.2rem;font-weight:600;color:#1f2937}
.premium-badge{color:#f59e0b;font-size:1.2rem}
.business-location{color:#6b7280;margin-bottom:.5rem;display:flex;align-items:center;gap:.5rem}
.business-industry{color:#4b5563;margin-bottom:1rem;display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.naics-code{background:#f3f4f6;padding:.2rem .5rem;border-radius:4px;font-size:.8rem;color:#6b7280}
.business-actions{display:flex;gap:.5rem;flex-wrap:wrap}

/* Pricing Grid */
.pricing-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.5rem;margin-top:2rem}
.pricing-card{background:white;border-radius:10px;padding:2rem;text-align:center;border:2px solid #e5e7eb;transition:transform .3s,box-shadow .3s}
.pricing-card:hover{transform:translateY(-5px);box-shadow:0 10px 25px rgba(0,0,0,.1)}
.pricing-card.premium{border-color:#f59e0b}
.pricing-card.enterprise{border-color:#db2777}
.pricing-card h4{font-size:1.5rem;margin-bottom:1rem;color:#1f2937}
.price{font-size:2.5rem;font-weight:700;margin-bottom:1rem;color:#4f46e5}
.price span{font-size:1rem;color:#6b7280}
.pricing-card ul{list-style:none;padding:0;margin-bottom:2rem;text-align:left}
.pricing-card li{padding:.5rem 0;color:#6b7280;border-bottom:1px solid #f3f4f6}
.pricing-card li:last-child{border-bottom:none}

/* Loading States */
.loading{text-align:center;padding:2rem;color:#6b7280}
.spinner{border:3px solid #f3f4f6;border-top:3px solid #4f46e5;border-radius:50%;width:40px;height:40px;animation:fa-spin 1s linear infinite;margin:0 auto 1rem}

/* Contact Details */
.contact-details h4{margin-bottom:1rem;color:#1f2937}
.contact-grid{display:grid;gap:1rem}
.contact-item{display:flex;align-items:flex-start;gap:1rem;padding:1rem;background:#f8fafc;border-radius:8px}
.contact-item i{color:#4f46e5;font-size:1.2rem;margin-top:.2rem}
.contact-item strong{display:block;color:#1f2937;margin-bottom:.2rem}
.contact-item p{margin:0;color:#4b5563}

/* Navbar */
.navbar{display:flex;justify-content:space-between;align-items:center;padding:1rem 0}
.logo{font-size:1.5rem;font-weight:700;color:white;text-decoration:none}
.nav-links{display:flex;list-style:none;gap:2rem;align-items:center}
.nav-links a{color:white;text-decoration:none;transition:opacity .3s}
.nav-links a:hover{opacity:.8}

/* Results Section */
.results-section{padding:40px 0;background:#f8f9fa}
.results-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2rem;flex-wrap:wrap;gap:1rem}

/* Responsive */
@media (max-width:768px){
    header h1{font-size:2rem}
    header p{font-size:1rem}
    .hero-stats{gap:1.5rem;flex-wrap:wrap}
    .stat-number{font-size:1.5rem}
    .search-form{grid-template-columns:1fr}
    .features-grid{grid-template-columns:1fr}
    .user-status-bar .status-content{flex-direction:column;gap:1rem;text-align:center}
    .user-dropdown{position:fixed;top:auto;bottom:0;left:0;right:0;border-radius:20px 20px 0 0}
    .auth-tabs{flex-direction:column}
    .notification{left:20px;right:20px;min-width:auto;max-width:none}
    .modal-content{margin:10% auto;width:95%}
    .business-actions{flex-direction:column}
    .pricing-grid{grid-template-columns:1fr}
    .navbar{flex-direction:column;gap:1rem}
    .nav-links{flex-direction:column;gap:1rem;text-align:center}
}
@media (max-width:480px){
    .container{padding:0 15px}
    header{padding:40px 0}
    .features-section{padding:50px 0}
    .feature-card{padding:20px}
}