:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.background-glow {
    position: fixed;
    top: -10vw;
    left: -10vw;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    z-index: -1;
    filter: blur(80px);
    opacity: 0.5;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10vw;
    right: -10vw;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 60%);
    z-index: -1;
    filter: blur(80px);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.highlight {
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease backwards;
}

.glass-card:nth-child(2) { animation-delay: 0.2s; }
.glass-card:nth-child(3) { animation-delay: 0.4s; }

.glass-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.upload-area {
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 3rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(59, 130, 246, 0.05);
}

.upload-area:hover, .upload-area.dragover {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.upload-area p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.primary { background: var(--primary); color: white; }
.btn.primary:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 4px 15px var(--primary-glow); }
.btn.secondary { background: rgba(255,255,255,0.1); color: white; border: 1px solid var(--border); }
.btn.secondary:hover { background: rgba(255,255,255,0.2); }
.btn.glow { 
    background: linear-gradient(135deg, var(--primary), var(--secondary)); 
    color: white; 
    font-size: 1.2rem; 
    padding: 1rem 3rem; 
    border-radius: 50px;
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}
.btn.glow:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px -5px var(--primary-glow);
}

.btn.small { padding: 0.3rem 0.6rem; font-size: 0.8rem; border-radius: 4px; }
.btn.remove { background: #ef4444; color: white; }
.btn.remove:hover { background: #dc2626; }

.action-submit {
    text-align: center;
    margin-top: 3rem;
}

.portal-management {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-glow {
    flex: 1;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.input-glow:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.portal-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.portal-list li {
    background: rgba(255,255,255,0.05);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}

.hidden { display: none !important; }

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading-section {
    text-align: center;
    padding: 3rem;
}

.file-name {
    margin-top: 1rem;
    text-align: center;
    color: var(--secondary);
    font-weight: 600;
}
