:root {
    --primary-color: #0d233a;
    --secondary-color: #1a4270;
    --accent-color: #2b7ce9;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-variation: #8f9bb3;
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.background-shape {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(43,124,233,0.1) 0%, rgba(255,255,255,0) 70%);
    top: -200px;
    left: -200px;
    z-index: -1;
    border-radius: 50%;
}

.background-shape.shape-2 {
    top: auto;
    bottom: -200px;
    left: auto;
    right: -200px;
    background: radial-gradient(circle, rgba(26,66,112,0.08) 0%, rgba(255,255,255,0) 70%);
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    flex: 1;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

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

.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .controls {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

#searchInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background-color: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(43, 124, 233, 0.2);
}

.glossary-container {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.glossary-header {
    display: flex;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.col {
    flex: 1;
}

.glossary-list {
    max-height: 600px;
    overflow-y: auto;
}

/* Custom Scrollbar for list */
.glossary-list::-webkit-scrollbar {
    width: 8px;
}
.glossary-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.glossary-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
.glossary-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.term-item {
    display: flex;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

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

.term-item:hover {
    background-color: #f9fafb;
}

.term-pt, .term-en {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-right: 1rem;
}

.term-main-pt {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.term-main-en {
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 1.05rem;
}

.term-var {
    font-size: 0.85rem;
    color: var(--text-variation);
    font-style: italic;
    margin-top: 0.25rem;
}

.no-results {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.term-item {
    animation: fadeIn 0.3s ease-out forwards;
}
