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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.form-section, .names-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-section h2, .names-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

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

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

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

.refresh-btn, .export-btn {
    flex: 1;
    min-width: 0;
}

.refresh-btn {
    background: #28a745;
}

.refresh-btn:hover {
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.export-btn {
    background: #dc3545;
}

.export-btn:hover {
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.export-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

.message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
}

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

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

.names-list {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
}

.name-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.name-item:last-child {
    border-bottom: none;
}

.name-text {
    font-weight: 500;
    color: #333;
}

.name-date {
    font-size: 0.85rem;
    color: #666;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}

.empty-state {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}
