/* assets/style.css */
#thai-name-generator-container {
    font-family: 'Noto Sans Thai', Arial, sans-serif;
    background: #394d5c;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin: 20px 0;
}

.thai-name-header {
    background: #b459a1;
    color: white;
    padding: 30px;
    text-align: center;
}

.thai-name-header h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.thai-name-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.thai-name-controls {
    padding: 30px;
    background: rgba(180, 89, 161, 0.1);
    border-bottom: 1px solid rgba(180, 89, 161, 0.2);
}

.day-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.day-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #394d5c;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.day-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.day-btn.active {
    background: #dc6c54;
    transform: scale(1.05);
}

.sort-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 10px 20px;
    border: 2px solid #b459a1;
    border-radius: 20px;
    background: white;
    color: #b459a1;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sort-btn:hover {
    background: #b459a1;
    color: white;
}

.thai-name-content {
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #b459a1;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #b459a1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.table-container {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#names-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#names-table th {
    background: #b459a1;
    color: white;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

#names-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

#names-table tr:nth-child(even) {
    background: rgba(180, 89, 161, 0.05);
}

#names-table tr:hover {
    background: rgba(220, 108, 84, 0.1);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.name-cell {
    font-weight: 600;
    color: #394d5c;
    font-size: 1rem;
}

.day-cell {
    color: #b459a1;
    font-weight: 500;
}

.numerology-cell {
    color: #dc6c54;
    font-weight: 500;
}

.gender-cell {
    padding: 8px;
}

.gender-male {
    background: #394d5c;
    color: white;
    border-radius: 15px;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.gender-female {
    background: #dc6c54;
    color: white;
    border-radius: 15px;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.meaning-cell {
    max-width: 200px;
    text-align: left;
    font-size: 0.8rem;
    line-height: 1.3;
}

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

.page-btn {
    padding: 10px 15px;
    border: 2px solid #b459a1;
    border-radius: 25px;
    background: white;
    color: #b459a1;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover {
    background: #b459a1;
    color: white;
    transform: translateY(-2px);
}

.page-btn.active {
    background: #dc6c54;
    border-color: #dc6c54;
    color: white;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc6c54;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #thai-name-generator-container {
        margin: 10px 0;
        border-radius: 10px;
    }
    .thai-name-header h1 {
        font-size: 2rem;
    }
    .day-selector {
        gap: 10px;
    }
    .day-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    .thai-name-controls {
        padding: 10px 5px;
    }
    .thai-name-content {
        padding: 10px 5px;
    }
    #names-table th, 
    #names-table td {
        padding: 8px 3px;
        font-size: 0.8rem;
    }
    .meaning-cell {
        max-width: 120px;
        font-size: 0.75rem;
    }
    .table-container {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    #thai-name-generator-container {
        margin: 4px 0;
        border-radius: 5px;
    }
    .thai-name-header {
        padding: 10px 2px;
    }
    .thai-name-header h1 {
        font-size: 1.3rem;
    }
    .day-selector {
        flex-direction: column;
        align-items: center;
    }
    .day-btn {
        width: 100%;
        max-width: 200px;
    }
    .thai-name-controls {
        padding: 5px 2px;
    }
    .thai-name-content {
        padding: 5px 2px;
    }
    #names-table th, 
    #names-table td {
        padding: 4px 1px;
        font-size: 0.7rem;
    }
    .table-container {
        border-radius: 4px;
    }
}