:root {
    --primary-color: #F2DC99;
    --secondary-color: #8ac4d0;
    --text-color: #333;
    --background-color: #f4f4f4;
    --accent-color: #ffd700;
    --error-color: #ff6b6b;
    --transition-standard: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-sharp: 0.2s cubic-bezier(0.4, 0, 1, 1);
    --transition-gentle: 0.4s cubic-bezier(0.0, 0, 0.2, 1);
}

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

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--background-color);
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
}

.search-container {
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    transform-origin: center;
    animation: containerAppear 0.6s var(--transition-gentle);
    margin-bottom: 20px;
    position: relative;
    z-index: 1000;
}

@keyframes containerAppear {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.title-container {
    margin-bottom: 2rem;
}

.emblem {
    width: 80px;
    height: 80px;
    background-image: url('../images/emblem.png');
    background-size: contain;
    background-repeat: no-repeat;
    margin: 0 auto 1rem;
}

h1 {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.divider {
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    margin: 1rem auto;
}

.subtitle {
    color: white;
    font-style: italic;
    opacity: 0.9;
}

.search-wrapper {
    position: relative;
    margin-top: 2rem;
    z-index: 1000;
}

#searchInput {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    outline: none;
    transition: var(--transition-standard);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#searchInput:focus {
    box-shadow: 0 0 0 3px rgba(242, 220, 153, 0.3);
    transform: translateY(-1px);
}

.suggestions-box {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: #000000;
    border: 1px solid var(--primary-color);
    border-radius: 0 0 8px 8px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
}

.suggestions-box li {
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    list-style: none;
    border-bottom: 1px solid rgba(242, 220, 153, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.suggestions-box li .resonator-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 50%;
}

.suggestions-box li:last-child {
    border-bottom: none;
}

.suggestions-box li:hover {
    background-color: rgba(242, 220, 153, 0.2);
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Common Button Styles */
.search-button,
.explore-button,
.back-button,
.close-btn,
.filter-button {
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--primary-color);
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Hover effect */
.search-button:hover,
.explore-button:hover,
.back-button:hover,
.close-btn:hover,
.filter-button:hover {
    background-color: #d9bc7c;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Active/Press effect */
.search-button:active,
.explore-button:active,
.back-button:active,
.close-btn:active,
.filter-button:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    background-color: #c4a86a;
}

/* Button ripple effect */
.search-button::after,
.explore-button::after,
.back-button::after,
.close-btn::after,
.filter-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.8) 10%, transparent 80%);
    transform: scale(4, 4);
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.3s ease-out;
}

.search-button:active::after,
.explore-button:active::after,
.back-button:active::after,
.close-btn:active::after,
.filter-button:active::after {
    transform: scale(0, 0);
    opacity: 0.8;
    transition: 0s;
}

/* Preserve specific button styles */
.search-button {
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.explore-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.explore-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #F2DC99;
}

.explore-button .button-icon {
    font-size: 1.2rem;
}

.filter-button {
    padding: 0.5rem 0.8rem;
    font-size: 1rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

.filter-button.active {
    background-color: var(--secondary-color);
    color: #000;
    border-color: var(--secondary-color);
    box-shadow: 0 0 8px rgba(138, 196, 208, 0.5);
}

/* Error Popup Styles */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup.active {
    display: flex;
}

.popup-content {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    color: white;
    border: 1px solid var(--primary-color);
}

.error-icon {
    font-size: 3rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}

.suggestions-list {
    list-style: none;
    margin: 1rem 0;
}

.suggestion-item {
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.suggestion-item:hover {
    color: var(--primary-color);
}

.close-btn {
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: #e6c988;
}

/* Loading Animation */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(242, 220, 153, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s ease infinite;
}

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

.error-message {
    color: var(--error-color);
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    background-color: rgba(255, 107, 107, 0.1);
    text-align: center;
}

/* Disclaimer Bar */
.disclaimer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.8rem;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
}

.disclaimer-bar p {
    margin: 0;
}

.explore-container {
    width: 100%;
    max-width: 600px;
    text-align: center;
    z-index: 1;
    position: relative;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d9bc7c;
}

/* Focus States and Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Page Transitions */
.page-transition {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

body.fade-out .page-transition {
    opacity: 0;
}

/* Loading States */
.skeleton-loading {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.1)
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        background-position: -200% 0;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 20px;
    background: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-standard);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-2px);
    background: #d9bc7c;
}

/* Tooltip Styles */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-standard);
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
} 