* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eaeaea;
}

h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

h1 i {
    color: #3498db;
    margin-right: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.search-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

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

#searchInput {
    flex: 1;
    min-width: 300px;
    padding: 18px 20px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

button {
    padding: 18px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#searchBtn {
    background-color: #3498db;
    color: white;
}

#searchBtn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

#clearBtn {
    background-color: #95a5a6;
    color: white;
}

#clearBtn:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

.hint {
    background-color: #e3f2fd;
    color: #1565c0;
    padding: 15px;
    border-radius: 10px;
    border-left: 5px solid #2196f3;
    font-size: 0.95rem;
    margin-top: 15px;
}

.hint i {
    margin-right: 8px;
    color: #2196f3;
}

.result-section {
    margin-bottom: 40px;
}

.result-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.8rem;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-left: 6px solid #3498db;
}

.result-card {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateX(5px);
}

.result-card:first-child {
    border-left-color: #27ae60;
    background: linear-gradient(to right, #f8fff8, white);
}

.match-score {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-card:first-child .match-score {
    background: #27ae60;
}

.question {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
    line-height: 1.5;
}

.answer {
    font-size: 1.1rem;
    color: #27ae60;
    background-color: #f1f8e9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #27ae60;
    line-height: 1.6;
}

.source {
    font-size: 0.9rem;
    color: #7f8c8d;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: inline-block;
}

mark {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.no-result-msg {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
    font-size: 1.2rem;
    background-color: #fdf2f2;
    border-radius: 15px;
    border: 1px dashed #e74c3c;
}

.no-result-msg i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.files-section {
    margin-top: 40px;
}

.files-section h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.8rem;
}

.files-description {
    color: #7f8c8d;
    margin-bottom: 25px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.file-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #eaeaea;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.file-icon {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 15px;
}

.file-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.file-desc {
    color: #7f8c8d;
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 15px;
}

.open-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.open-link:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #eaeaea;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.footer-note {
    margin-top: 10px;
    color: #9b59b6;
    font-weight: 600;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    #searchInput {
        min-width: 100%;
    }
    
    button {
        width: 100%;
        justify-content: center;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 20px;
    }
    
    .question {
        font-size: 1.1rem;
    }
    
    .answer {
        font-size: 1rem;
    }
}
