:root {
    --bg-color: #1a2421;
    --text-color: #c5ab9f;
    --accent-gold: #c29b40;
    --text-highlight: #f9f7f2;
    --font-heading: 'Cormorant SC', serif;
    --font-body: 'Urbanist', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top instead of center to prevent cutting off top */
    padding: 10px;
    letter-spacing: 1px;
}

.container {
    width: 100%;
    max-width: 600px;
    background: rgba(249, 247, 242, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(194, 155, 64, 0.1);
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-highlight);
    margin-bottom: 10px;
    letter-spacing: 4px;
    font-variant: small-caps;
}

.header p {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.4;
    letter-spacing: 1px;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(249, 247, 242, 0.2);
    border-radius: 8px;
    color: var(--text-highlight);
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(194, 155, 64, 0.2);
}

input[type="text"]::placeholder {
    color: rgba(249, 247, 242, 0.4);
}

button {
    padding: 14px 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: transparent;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    background: rgba(194, 155, 64, 0.08);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    border-color: #555;
    color: #555;
    background: transparent;
    cursor: not-allowed;
    transform: none;
}

.results-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(249, 247, 242, 0.1);
    min-height: 80px;
}

.hidden {
    display: none !important;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: rgba(249, 247, 242, 0.7);
    font-style: italic;
    animation: pulse 2s infinite ease-in-out;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(194, 155, 64, 0.2);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.result-content {
    animation: fadeIn 0.5s ease;
}

.result-content h3 {
    font-family: var(--font-mono);
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 0.95rem;
    letter-spacing: 1px;
    font-weight: 400;
}

.summary-text {
    line-height: 1.5;
    font-size: 0.95rem;
    color: var(--text-highlight);
}

.summary-text p {
    margin-bottom: 10px;
}

.summary-text strong {
    color: var(--text-highlight);
}

.error-state {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    .header h1 {
        font-size: 1.8rem;
    }
}
