:root {
    --bg-color: #05070a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-glow: #00f2fe;
    --secondary-glow: #4facfe;
    --accent: #5efce8;
    --text-main: #ffffff;
    --text-muted: #a0aec0;
    --error: #f56565;
    --success: #48bb78;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Static background blobs for aesthetics */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.15;
    border-radius: 50%;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-glow);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-glow);
    bottom: -50px;
    left: -50px;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #7928ca;
    top: 40%;
    left: 20%;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.glow-text {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, var(--primary-glow), var(--secondary-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.3));
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.search-section {
    margin-bottom: 2rem;
}

.search-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flex-grow {
    flex-grow: 1;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input, select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

input:focus, select:focus {
    border-color: var(--primary-glow);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.primary-btn {
    position: relative;
    background: var(--primary-glow);
    color: #000;
    border: none;
    padding: 0.85rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 242, 254, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.primary-btn:hover .btn-glow {
    left: 100%;
}

/* Results Content Styles */
.results-section {
    display: grid;
    gap: 1.5rem;
}

.concept-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.concept-card:hover {
    border-color: var(--secondary-glow);
}

.concept-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.concept-code {
    font-family: monospace;
    background: var(--secondary-glow);
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.concept-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.mapping-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mapping-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
}

.snomed-tag {
    background: #805ad5;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    text-transform: uppercase;
}

.mapping-name {
    flex-grow: 1;
    font-weight: 500;
}

.mapping-id {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Loader Styles */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--text-muted);
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--glass-border);
    border-bottom-color: var(--primary-glow);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-glow);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.error-card {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .glow-text {
        font-size: 2rem;
    }
}
