:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #334155;
    --secondary-hover: #475569;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #4338ca;
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #0f766e;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 60%;
    width: 400px;
    height: 400px;
    background: #7e22ce;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* Glassmorphism Utilities */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    margin: 1rem 5%;
    position: sticky;
    top: 1rem;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.logo-icon {
    color: var(--primary-color);
    width: 28px;
    height: 28px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 1rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Upload Section */
.upload-section {
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    max-width: 600px;
    margin: 0 auto;
}

.drag-drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.drag-drop-zone:hover .upload-icon {
    transform: translateY(-5px);
}

.drag-drop-zone h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.file-limits {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Upload Progress */
.upload-progress {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #818cf8);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Results Section */
.results-section {
    padding: 2rem;
    animation: fadeIn 0.5s ease;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.score-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    max-height: 100px;
}

.circle-bg {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}

/* Color classes for circle based on score */
.circle.safe { stroke: var(--success-color); }
.circle.warning { stroke: var(--warning-color); }
.circle.danger { stroke: var(--danger-color); }

.percentage {
    fill: #fff;
    font-family: sans-serif;
    font-size: 0.5em;
    text-anchor: middle;
    font-weight: bold;
}

.score-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.results-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: rgba(15, 23, 42, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-3px);
}

.detail-card i {
    color: #818cf8;
    width: 32px;
    height: 32px;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Dashboard Section */
.dashboard-section {
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-container {
    overflow-x: auto;
}

.submissions-table {
    width: 100%;
    border-collapse: collapse;
}

.submissions-table th, .submissions-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.submissions-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.submissions-table tr {
    transition: background-color 0.2s ease;
}

.submissions-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.score-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.score-badge.safe { color: var(--success-color); }
.score-badge.warning { color: var(--warning-color); }
.score-badge.danger { color: var(--danger-color); }

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-icon {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem;
}

.btn-icon:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.btn-text {
    background: transparent;
    color: var(--primary-color);
    padding: 0.5rem;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Utilities */
.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}
