/* SwooshStock Platform - Modern Responsive Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Landing Section */
#landing-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.landing-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    max-width: 900px;
    width: 100%;
    margin: 20px;
}

.landing-left {
    flex: 1;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.landing-right {
    flex: 1;
    padding: 60px 40px;
    background: white;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 2.5rem;
    margin-right: 15px;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.5rem;
    color: #64748b;
    margin-bottom: 30px;
    font-weight: 300;
}

.features-list {
    list-style: none;
    margin-bottom: 30px;
}

.features-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: #475569;
}

.features-list li::before {
    content: '✓';
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    font-size: 12px;
}

/* Auth Forms */
.auth-container {
    width: 100%;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #f1f5f9;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active,
#login-tab {
    display: block;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Dashboard Section */
#dashboard-section {
    display: none;
    background: #f8fafc;
    min-height: 100vh;
}

.dashboard-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    display: flex;
    align-items: center;
}

.header-title h1 {
    font-size: 1.8rem;
    margin-left: 15px;
    color: #1e293b;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email {
    font-weight: 600;
    color: #475569;
}

.admin-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #dc2626;
}

/* Recommendations Grid */
.dashboard-content {
    padding: 0 20px 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stock-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.stock-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #e5e7eb;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stock-symbol {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
}

.recommendation-badge {
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.recommendation-badge.large {
    font-size: 1.1rem;
    padding: 10px 20px;
    margin-bottom: 10px;
}

.company-name {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.stock-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.price-change {
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 8px;
}

.price-change.positive {
    color: #22c55e;
}

.price-change.negative {
    color: #ef4444;
}

.stock-metrics {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 0.9rem;
}

.performance {
    color: #64748b;
    font-size: 0.85rem;
}

/* No Recommendations */
.no-recommendations {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-recommendations h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #374151;
}

/* Analysis Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 30px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-size: 1.1rem;
}

.error {
    color: #ef4444;
    text-align: center;
    padding: 20px;
    background: #fef2f2;
    border-radius: 10px;
    border: 1px solid #fecaca;
}

/* Analysis Content */
.analysis-summary {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.company-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.company-info h3 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.price-info {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
}

.recommendation-section {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 15px;
}

.confidence {
    margin-top: 10px;
    color: #64748b;
    font-weight: 600;
}

.scores {
    margin-top: 8px;
    color: #64748b;
    font-size: 0.9rem;
}

.key-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.metric {
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
}

.metric label {
    display: block;
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.metric value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
}

.technical-signals h4 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.signals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.signal {
    padding: 10px 15px;
    background: #f1f5f9;
    border-radius: 8px;
    color: #475569;
    font-size: 0.9rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #22c55e;
}

.toast.error {
    background: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .landing-content {
        flex-direction: column;
        margin: 10px;
    }
    
    .landing-left,
    .landing-right {
        padding: 40px 30px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .key-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.5rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .landing-left,
    .landing-right {
        padding: 30px 20px;
    }
    
    .key-metrics {
        grid-template-columns: 1fr;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-spinner p {
    margin: 0;
    color: #64748b;
    font-weight: 600;
}

/* Performance optimizations */
.stock-card {
    will-change: transform;
}

.btn {
    will-change: transform;
}

/* Additional Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* Print styles */
@media print {
    .dashboard-header,
    .logout-btn,
    .modal {
        display: none;
    }
    
    .recommendations-grid {
        display: block;
    }
    
    .stock-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}