:root {
    --bg-color: #0d1117;
    --glass-bg: rgba(22, 27, 34, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #5c6bc0;
    --primary-hover: #7986cb;
    --secondary: #00acc1;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    
    --success: #2ea043;
    --warning: #d29922;
    --danger: #f85149;

    --blob-1: #5c6bc0;
    --blob-2: #8e24aa;
    --blob-3: #00acc1;
}

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

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

/* Background Blobs for Visual Aesthetics */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
    opacity: 0.5;
}

.blob {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

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

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--blob-2);
    bottom: 10%;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 500px;
    height: 500px;
    background: var(--blob-3);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.4;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Navigation */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #bbdefb, #5c6bc0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

/* Layout */
.container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Forms */
.slide-up {
    animation: slideUp 0.6s ease forwards;
    padding: 2.5rem;
}

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

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
}

input[type="text"], textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.2);
}

.file-input {
    display: none;
}

.file-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-muted);
    text-align: center;
}

.file-drop-area:hover {
    border-color: var(--primary);
    background: rgba(92, 107, 192, 0.05);
}

.file-drop-area i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(92, 107, 192, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 107, 192, 0.6);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.scanner-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scanner-icon {
    font-size: 3rem;
    color: var(--secondary);
    z-index: 2;
}

.scanner-beam {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 70%, rgba(0, 172, 193, 0.8) 100%);
    animation: scan 2s linear infinite;
    transform-origin: center;
}

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

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

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

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-unique { background: rgba(46, 160, 67, 0.2); color: var(--success); border: 1px solid var(--success); }
.status-similar { background: rgba(210, 153, 34, 0.2); color: var(--warning); border: 1px solid var(--warning); }
.status-exists { background: rgba(248, 81, 73, 0.2); color: var(--danger); border: 1px solid var(--danger); }

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

.metric-card {
    padding: 1.5rem;
    text-align: center;
}

.metric-card h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.circular-progress {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(var(--success) 3.6deg, rgba(255,255,255,0.1) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.circular-progress::before {
    content: "";
    position: absolute;
    inset: 10px;
    background: var(--bg-color);
    border-radius: 50%;
}

.progress-value {
    position: relative;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Outfit';
}

.risk-low { color: var(--success); font-size: 2rem; }
.risk-med { color: var(--warning); font-size: 2rem; }
.risk-high { color: var(--danger); font-size: 2rem; }

.text-small {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    color: #c9d1d9;
}

.similar-patents {
    padding: 1.5rem;
}

.similar-patents h3 {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.patent-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.patent-item:last-child {
    border-bottom: none;
}

.patent-info {
    flex: 1;
}

.patent-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.patent-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sim-score {
    font-weight: bold;
    font-family: 'Outfit';
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.mt-1 { margin-top: 1rem; }
