:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --bg: #030712;
    --card-bg: rgba(17, 24, 39, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #10b981;
}

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

body {
    background-color: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.15;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: #ec4899;
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #3b82f6;
    top: 50%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 100px) scale(1.1); }
}

/* Nav */
nav {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(to right, var(--primary), #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.status-badge {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-badge.connected {
    border-color: var(--accent);
    color: var(--accent);
}

/* Main */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 4rem;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

header h1 span {
    color: var(--primary);
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Upload Container */
.upload-container {
    margin: 2rem auto;
    max-width: 800px;
    position: relative;
}

.drop-zone {
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px -10px var(--primary-glow);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--primary);
}

.drop-zone h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.drop-zone p {
    color: var(--text-muted);
}

/* Loader */
#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 24px;
    z-index: 10;
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Results */
.results-section {
    margin-top: 4rem;
    animation: fadeIn 0.8s ease-out;
}

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

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

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: scale(1.02);
}

.result-card.highlight {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.image-wrapper {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-info {
    padding: 1.25rem;
}

.card-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.card-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Buttons */
.secondary-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

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

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

/* Footer */
footer {
    padding: 3rem 5%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    header h1 { font-size: 2.5rem; }
}
