/* Knowledge Graph Entity Checker - Frontend Styles */

.kg-frontend-search {
    max-width: 700px;
    margin: 20px auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.kg-search-title {
    color: #fff;
    text-align: center;
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 600;
}

.kg-frontend-quota {
    display: block;
    width: fit-content;
    margin: 0 auto 16px auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(40, 72, 143, 0.35);
    border: 1px solid rgba(240, 192, 84, 0.85);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.kg-search-box {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.kg-frontend-input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    border-radius: 50px;
    outline: none;
    background: transparent;
}

.kg-frontend-input::placeholder {
    color: #999;
}

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

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

.kg-frontend-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.kg-frontend-status {
    text-align: center;
    margin-top: 20px;
    min-height: 30px;
}

.kg-status-loading {
    color: #fff;
    font-size: 14px;
}

.kg-status-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: kg-spin 1s linear infinite;
    vertical-align: middle;
}

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

.kg-status-success {
    background: #10b981;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

.kg-status-error {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

.kg-frontend-results {
    margin-top: 25px;
}

.kg-result-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.kg-result-card:hover {
    transform: translateY(-3px);
}

.kg-result-image {
    flex: 0 0 100px;
}

.kg-result-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}

.kg-result-content {
    flex: 1;
}

.kg-result-name {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #1e1e1e;
}

.kg-result-types {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

.kg-result-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
}

.kg-result-detailed {
    color: #777;
    font-size: 13px;
    line-height: 1.5;
    font-style: italic;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.kg-result-meta {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.kg-result-score {
    font-size: 12px;
    color: #888;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
}

.kg-result-link {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.kg-result-link:hover {
    text-decoration: underline;
}

.kg-result-id {
    font-size: 11px;
    color: #aaa;
    word-break: break-all;
    margin-top: 10px;
}

.kg-entity-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #10b981;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 15px;
}

.kg-entity-badge svg {
    width: 20px;
    height: 20px;
}

.kg-no-entity {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
}

.kg-no-entity-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.kg-no-entity-text {
    font-size: 16px;
    line-height: 1.6;
}

.kg-entity-card.frontend {
    max-width: 500px;
    margin: 20px auto;
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.kg-entity-card.frontend .kg-entity-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.kg-entity-card.frontend .kg-entity-name {
    margin: 0 0 8px 0;
    font-size: 20px;
}

.kg-entity-card.frontend .kg-entity-types {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.kg-entity-card.frontend .kg-entity-description {
    margin: 10px 0;
    color: #555;
    line-height: 1.6;
}

.kg-entity-card.frontend .kg-entity-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

@media (max-width: 600px) {
    .kg-frontend-search {
        padding: 20px;
        margin: 10px;
    }
    
    .kg-search-box {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .kg-frontend-input {
        border-radius: 12px;
        text-align: center;
    }
    
    .kg-frontend-button {
        border-radius: 12px;
    }
    
    .kg-result-card {
        flex-direction: column;
        text-align: center;
    }
    
    .kg-result-image {
        flex: none;
    }
    
    .kg-result-image img {
        width: 80px;
        height: 80px;
    }
    
    .kg-result-meta {
        justify-content: center;
    }
    
    .kg-entity-card.frontend {
        flex-direction: column;
        text-align: center;
    }
}