:root {
    --primary: #2d6a4f;
    --primary-light: #40916c;
    --primary-vibrant: #74c69d;
    --secondary: #ffd60a;
    --bg-dark: #081c15;
    --text-main: #d8f3dc;
    --text-muted: #95d5b2;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
}

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

.blob-2 {
    width: 400px;
    height: 400px;
    background-color: var(--secondary);
    bottom: -100px;
    left: -100px;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background-color: var(--primary-light);
    top: 40%;
    left: 20%;
}

/* Layout */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
}

.hero {
    text-align: center;
    padding: 4rem 5%;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--secondary);
}

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

/* Glass Panels */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
}

/* Upload Section */
.upload-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 5%;
}

#drop-zone {
    border: 2px dashed var(--glass-border);
    text-align: center;
    padding: 4rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#drop-zone:hover {
    border-color: var(--primary-vibrant);
    background: rgba(255, 255, 255, 0.08);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Results */
#result-container {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    #result-container {
        grid-template-columns: 1fr;
    }
}

.canvas-wrapper {
    width: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

canvas {
    max-width: 100%;
    height: auto;
}

.detection-list {
    margin: 1.5rem 0;
}

.detection-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--secondary);
}

.detection-item h4 {
    color: var(--secondary);
    margin-bottom: 0.2rem;
}

.detection-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--secondary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 214, 10, 0.3);
}

.btn-secondary {
    background: var(--primary-light);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

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

/* Camera Modal */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.camera-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

#webcam {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 1rem;
}

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

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 5%;
}

footer {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--secondary);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

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

.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 24px;
}
