:root {
    --bg-color: #030712;
    --card-bg: rgba(17, 24, 39, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-hover-border: rgba(99, 102, 241, 0.5);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --accent-primary: #818cf8; /* Indigo 400 */
    --accent-secondary: #c084fc; /* Purple 400 */
    --accent-tertiary: #38bdf8; /* Sky 400 */
    --gradient-main: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Noto Sans SC', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Background Effects */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

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

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

.globe-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: 20%;
    right: -50px;
    animation-delay: -2s;
}

.globe-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-tertiary);
    top: 40%;
    left: 30%;
    opacity: 0.2;
    animation-duration: 15s;
}

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

/* Header */
.main-header {
    padding: 6rem 0 4rem;
    text-align: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Search Box */
.search-container {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 9999px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    backdrop-filter: blur(12px);
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    color: var(--text-secondary);
    margin-right: 1rem;
    min-width: 24px;
}

#searchInput {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    width: 100%;
    outline: none;
}

#searchInput::placeholder {
    color: rgba(156, 163, 175, 0.6);
}

/* Grid Layout */
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

/* Term Card */
.term-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.term-card:hover {
    transform: translateY(-8px);
    border-color: var(--card-hover-border);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.15);
}

.card-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.term-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.term-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-tertiary);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.term-definition {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.code-snippet {
    background: #000;
    border-radius: 0.75rem;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: #e5e7eb;
    margin-top: auto;
    position: relative;
    border: 1px solid rgba(255,255,255,0.08);
}

.code-snippet span.key { color: var(--accent-secondary); }
.code-snippet span.string { color: var(--accent-primary); }
.code-snippet span.comment { color: #6b7280; }

.term-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    color: #9ca3af;
    background: rgba(255,255,255,0.03);
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
}

/* Footer */
.main-footer {
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    color: #4b5563;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.03);
}

/* Responsive */
@media (max-width: 768px) {
    .logo-text { font-size: 3rem; }
    .main-header { padding: 4rem 0 2rem; }
    .terms-grid { grid-template-columns: 1fr; }
    .search-container { padding: 0 1rem; }
}
