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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

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

header p {
    opacity: 0.9;
    font-size: 0.95em;
}

nav {
    background: #f8f9fa;
    padding: 15px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: #667eea;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

nav a:hover {
    background: #667eea;
    color: white;
}

.content {
    padding: 40px;
}

.search-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.search-form h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

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

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

button.secondary {
    background: #6c757d;
}

button.secondary:hover {
    background: #5a6268;
}

button.danger {
    background: #dc3545;
}

button.danger:hover {
    background: #c82333;
}

.results {
    margin-top: 40px;
}

.results h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.result-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    transition: all 0.3s;
}

.result-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.result-item h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.result-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
}

.meta-item {
    background: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.meta-label {
    font-weight: 600;
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    margin-right: 5px;
    margin-bottom: 5px;
}

.badge.cn {
    background: #28a745;
}

.badge.scn {
    background: #ffc107;
    color: #333;
}

.badge.adv {
    background: #17a2b8;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

table tr:hover {
    background: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons a,
.action-buttons button {
    padding: 6px 12px;
    font-size: 0.9em;
    margin: 0;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    text-decoration: none;
    color: #667eea;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #667eea;
    color: white;
}

.pagination .active {
    background: #667eea;
    color: white;
}

footer {
    background: #f8f9fa;
    padding: 20px 30px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
}

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

.no-results p {
    font-size: 1.1em;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .result-meta {
        grid-template-columns: 1fr;
    }
    
    nav {
        flex-direction: column;
        gap: 10px;
    }
}
