:root {
    --primary-blue: #0080ff;
    --primary-green: #00cc00;
    --light-blue: #66b3ff;
    --light-green: #66ff66;
    --dark-blue: #0066cc;
    --dark-green: #009900;
    --text-white: #ffffff;
    --text-dark: #333333;
    --text-muted: #5f6b76;
    --border-gray: #cccccc;
    --background-light: #f8f9fa;
    --panel-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --glass-white: rgba(255, 255, 255, 0.1);
    --glass-white-hover: rgba(255, 255, 255, 0.2);
    --danger-bg: #ffebee;
    --danger-text: #c62828;
    --docs-bg: #eef6ff;
}

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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--light-green) 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

.header {
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    padding: 1rem 2rem;
    box-shadow: var(--header-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.logo-text {
    color: var(--text-white);
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.navigation {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: var(--glass-white);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--glass-white-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.search-container {
    background: var(--text-white);
    border-radius: 50px;
    padding: 1rem;
    box-shadow: var(--panel-shadow);
    max-width: 600px;
    margin: 0 auto 2rem;
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: var(--background-light);
}

.search-button {
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    color: var(--text-white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.search-suggestions {
    background: var(--text-white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-gray);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background: var(--background-light);
}

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

.country-result {
    background: var(--text-white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--panel-shadow);
    margin-top: 2rem;
    display: none;
}

.country-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-gray);
}

.country-flag {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.country-name {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.country-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-section {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-green);
}

.info-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info-item {
    margin-bottom: 0.5rem;
}

.info-label {
    font-weight: bold;
    color: var(--dark-blue);
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.error {
    background: var(--danger-bg);
    color: var(--danger-text);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

.docs-shell {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--docs-bg) 0%, var(--background-light) 100%);
}

.docs-frame {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.docs-panel {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--panel-shadow);
    border: 1px solid rgba(0, 102, 204, 0.14);
}

.docs-heading {
    padding: 1.25rem 1.5rem;
    color: var(--text-white);
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-green) 100%);
}

.docs-heading h1 {
    font-size: 1.4rem;
}

.docs-heading p {
    margin-top: 0.35rem;
    opacity: 0.95;
}

.docs-body {
    padding: 1.5rem 2rem 2rem;
}

.docs-body h2 {
    color: var(--dark-blue);
    font-size: 1.15rem;
    margin: 1.75rem 0 0.75rem;
}

.docs-body h2:first-of-type {
    margin-top: 0.5rem;
}

.docs-body code {
    background: var(--background-light);
    color: var(--dark-blue);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.endpoint-table {
    width: 100%;
    border-collapse: collapse;
}

.endpoint-table th, .endpoint-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-gray);
    vertical-align: top;
}

.endpoint-table th {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.endpoint-table a {
    color: var(--primary-blue);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.endpoint-table a:hover {
    text-decoration: underline;
}

.endpoint-links {
    list-style: none;
    padding: 0;
}

.endpoint-links li {
    padding: 0.4rem 0;
}

.endpoint-links a {
    color: var(--primary-blue);
    font-weight: 500;
}

.endpoint-item {
    margin-bottom: 1.25rem;
}

.endpoint-item p {
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.endpoint-item pre {
    background: var(--text-dark);
    color: var(--light-green);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .navigation {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .search-container {
        flex-direction: column;
        padding: 1.5rem;
    }

    .country-header {
        flex-direction: column;
        text-align: center;
    }

    .country-info {
        grid-template-columns: 1fr;
    }

    .docs-frame {
        padding: 1rem;
    }
}
