@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #0A192F;
    --bg-card: rgba(13, 25, 48, 0.45);
    --text-primary: #FFFFFF;
    --text-secondary: #8892B0;
    --accent-teal: #64FFDA;
    --accent-blue: #2F80ED;
    --accent-orange: #FFB74D;
    --border-light: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 80% -10%, rgba(47, 128, 237, 0.15), transparent 500px),
        radial-gradient(circle at 10% 110%, rgba(100, 255, 218, 0.1), transparent 500px);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Glassmorphism foundation for all cards */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    border-top: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

header p {
    color: var(--text-secondary);
    margin: 0.5rem 0 0 0;
    font-size: 1.1rem;
}

.profile-icon {
    width: 48px; 
    height: 48px; 
    background: rgba(255,255,255,0.05); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 1.2rem;
}

/* The Upload Zone */
.upload-zone {
    text-align: center;
    border: 2px dashed rgba(100, 255, 218, 0.25);
    padding: 3.5rem 2rem;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--accent-teal);
    background: rgba(100, 255, 218, 0.05);
}

.upload-zone h2 {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.upload-zone input[type="file"] {
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.upload-zone input[type="file"]::file-selector-button {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-right: 1rem;
    cursor: pointer;
    font-family: inherit;
}

.upload-zone button {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(47, 128, 237, 0.3);
    margin-top: 1rem;
}

.upload-zone button:hover {
    background: #1e6bd4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 128, 237, 0.4);
}

/* Key Metrics Grid */
.metrics-header {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.metric-card {
    text-align: center;
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.metric-card h3 {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    margin-top: 0;
}

.metric-value {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.val-teal { color: var(--accent-teal); text-shadow: 0 0 20px rgba(100, 255, 218, 0.4); }
.val-blue { color: var(--accent-blue); text-shadow: 0 0 20px rgba(47, 128, 237, 0.4); }
.val-orange { color: var(--accent-orange); text-shadow: 0 0 20px rgba(255, 183, 77, 0.4); }

/* Historical & Feedback Split Section */
.lower-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.trend-card h3, .feedback-card h3 {
    margin-top: 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.trend-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
}

.trend-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.trend-list li:last-child {
    border-bottom: none;
}

.trend-list li strong {
    color: var(--accent-teal);
    font-weight: 600;
}

.feedback-text {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* Loading Overlay Animation */
#loadingOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(100, 255, 218, 0.1);
    border-top-color: var(--accent-teal);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin-bottom: 1.5rem;
}

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

/* Error Banners */
.error-banner {
    background: rgba(255, 77, 77, 0.1);
    border-left: 4px solid #ff4d4d;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    color: #ffb3b3;
    border-radius: 4px;
    font-weight: 600;
}

/* Responsive collapse for small screens */
@media (max-width: 768px) {
    .lower-grid {
        grid-template-columns: 1fr;
    }
}

/* Authentication Screens */
.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(circle at center, rgba(100, 255, 218, 0.15) 0%, transparent 60%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.auth-card {
    padding: 3rem 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 2.5rem;
    margin: 0;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.auth-header h2 {
    font-size: 1.5rem;
    margin: 1rem 0 0.5rem 0;
}

.auth-header p {
    color: var(--text-secondary);
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.auth-input {
    width: 100%;
    background: rgba(13, 25, 48, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.2);
}

.auth-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.remember-me {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input {
    accent-color: var(--accent-teal);
}

.forgot-link, .auth-footer a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.forgot-link:hover, .auth-footer a:hover {
    color: var(--accent-teal);
}

.auth-btn {
    width: 100%;
    background: var(--accent-teal);
    color: #0d1321;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.3);
}

.auth-btn:hover {
    background: #4de0c2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 255, 218, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-success {
    color: #64FFDA; 
    background: rgba(100,255,218,0.1); 
    padding: 1rem; 
    margin-bottom: 2rem; 
    border-radius: 4px;
    border-left: 4px solid #64FFDA;
}
