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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.display-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9em;
    color: #555;
}

.radio-label input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.radio-label:hover {
    color: #667eea;
}

.tooltip-container {
    position: relative;
}

.tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85em;
    width: 280px;
    text-align: center;
    z-index: 1000;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

input[type="text"] {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.global-select-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
}

.tab-btn {
    position: relative;
    background: transparent;
    color: #666;
    border: none;
    border-radius: 0;
    padding: 12px 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: none;
    transform: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    margin: 0;
}

.tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: none;
    box-shadow: none;
}

.tab-btn.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    margin-bottom: -2px;
}

.tab-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background: #333;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.8em;
    width: 300px;
    text-align: left;
    line-height: 1.4;
    z-index: 1000;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    font-weight: normal;
}

.tab-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.tab-btn:hover .tab-tooltip {
    visibility: visible;
    opacity: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.info {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.info h3 {
    color: #667eea;
    margin-bottom: 0;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.select-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.select-btn {
    padding: 6px 12px;
    font-size: 0.75em;
    font-weight: 600;
    background: white;
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.select-btn:active {
    transform: translateY(0);
}

.museum-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    column-gap: 20px;
}

.category-header {
    grid-column: 1 / -1;
    font-weight: 700;
    color: #667eea;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 15px;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e0e0ff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-header:first-child {
    margin-top: 0;
}

.category-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.category-title {
    flex: 1;
}

.museum-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.museum-checkbox-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.museum-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
}

.museum-checkbox-item label {
    font-size: 0.9em;
    color: #555;
    cursor: pointer;
    flex: 1;
}

.footer {
    text-align: center;
    margin-top: 30px;
    color: #999;
    font-size: 0.85em;
}

.footer-count {
    margin-bottom: 20px;
}

.footer-credits {
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
}

.credits-title {
    font-family: 'Amarante', serif;
    font-size: 1.1em;
    color: #667eea;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.credits-links {
    font-size: 0.9em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.credits-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.credits-links a:hover {
    color: #667eea;
}

.credits-links .separator {
    color: #ddd;
}

@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .search-box {
        flex-direction: column;
    }

    .museum-checkboxes {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 0;
        text-align: left;
    }

    .tab-btn.active {
        border-left: 3px solid #667eea;
        border-bottom: 1px solid #e0e0e0;
    }
}

.status {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9em;
    display: none;
}

.status.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.status.warning {
    background: #fff3cd;
    color: #856404;
    display: block;
}

/* Iframe display styles */
.iframe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    overflow: auto;
    padding: 20px;
}

.iframe-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 15px 20px;
    border-bottom: 2px solid #667eea;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: all 0.3s ease;
}

.iframe-header.collapsed {
    padding: 8px 20px;
    justify-content: flex-end;
    background: transparent;
    border-bottom: none;
}

.iframe-header.collapsed h2 {
    display: none;
}

.iframe-header h2 {
    margin: 0;
    color: #667eea;
    font-size: 1.3em;
    transition: all 0.3s ease;
}

.close-iframes {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.iframe-header.collapsed .close-iframes {
    padding: 6px 12px;
    font-size: 0.9em;
}

.close-iframes:hover {
    background: #5568d3;
}

.iframe-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.iframe-item {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}

.iframe-item-header {
    background: #667eea;
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.iframe-item-header a {
    color: white;
    text-decoration: none;
    font-size: 0.85em;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.iframe-item-header a:hover {
    background: rgba(255, 255, 255, 0.3);
}

.iframe-item iframe {
    width: 100%;
    height: 600px;
    border: none;
    background: white;
}
