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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.admin-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.translate-widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#google_translate_element .goog-te-gadget {
    font-family: inherit !important;
    color: white !important;
}

#google_translate_element .goog-te-combo {
    background: #1e293b !important;
    color: white !important;
    border: 1px solid #475569 !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    margin: 0 !important;
    font-size: 12px !important;
}

#google_translate_element .goog-te-combo option {
    background: #1e293b !important;
    color: white !important;
}

.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

.skiptranslate iframe {
    visibility: hidden !important;
    height: 0 !important;
}

.count-badge {
    background: #3498db;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.admin-main {
    flex: 1;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.search-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.search-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.results-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    gap: 15px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e6ed;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    text-align: center;
    border-left: 4px solid #e74c3c;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-results h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.results-list {
    padding: 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e6ed;
    transition: background-color 0.2s ease;
}

.result-item:hover {
    background: #f8f9fa;
}

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

.result-info {
    flex: 1;
}

.result-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.result-details {
    display: flex;
    gap: 20px;
    color: #6c757d;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

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

.modal-content {
    background: white;
    border-radius: 10px;
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e6ed;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.detail-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e6ed;
}

.detail-card.highest {
    border-color: #28a745;
    background: #d4edda;
}

.detail-card h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1rem;
}

.detail-card .score {
    font-size: 1.8rem;
    font-weight: bold;
    color: #3498db;
}

.detail-card.highest .score {
    color: #28a745;
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e6ed;
}

.info-label {
    font-weight: 600;
    color: #2c3e50;
}

.info-value {
    color: #6c757d;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .translate-widget {
        order: -1;
        margin-bottom: 10px;
    }

    .search-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .result-actions {
        align-self: flex-end;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}