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

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

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

header {
    background: #1a1a2e;
    color: white;
    padding: 24px;
    text-align: center;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.subtitle {
    color: #888;
    font-size: 0.9rem;
}

main {
    padding: 24px;
}

.form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.form-section h3 {
    color: #333;
    margin-bottom: 16px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #667eea;
    border-radius: 2px;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

input[type="text"],
input[type="datetime-local"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn input {
    flex: 1;
}

.btn-search {
    padding: 12px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-search:hover {
    background: #5a6fd6;
}

.search-result {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #28a745;
}

.search-result.error {
    color: #dc3545;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.result-section {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #667eea;
}

.result-section h3 {
    margin-bottom: 16px;
    color: #333;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.result-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.result-item .label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
}

.result-item .value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.result-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    grid-column: span 2;
}

.result-item.highlight .label {
    color: rgba(255,255,255,0.8);
}

.result-item.highlight .value {
    color: white;
    font-size: 1.5rem;
}

.result-detail {
    font-size: 0.9rem;
    color: #666;
}

.result-detail p {
    margin-bottom: 8px;
}

footer {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 0.8rem;
    border-top: 1px solid #eee;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

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

    .result-item.highlight {
        grid-column: span 1;
    }
}
