style.css 4.59 KB
/* SearchEngine Frontend Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

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

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

#searchInput {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
}

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

.search-button:hover {
    transform: translateY(-2px);
}

.search-options {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.search-options select {
    padding: 5px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
}

.search-examples {
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

.example-btn {
    padding: 8px 15px;
    margin: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.example-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.loading {
    text-align: center;
    padding: 40px;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.results-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.results-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.results-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.results-stats {
    color: #666;
    font-size: 14px;
}

.result-item {
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s;
}

.result-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.result-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.result-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.result-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.result-meta span {
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 5px;
}

.result-image {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 10px;
}

.query-info {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.query-info h3 {
    color: #333;
    margin-bottom: 15px;
}

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

.info-item {
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.info-item strong {
    display: block;
    color: #667eea;
    margin-bottom: 5px;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    opacity: 0.8;
}

.error-message {
    background: #ff4444;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

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