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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    min-height: 100vh;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    background-color: #fff;
    padding: 2rem;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.sidebar h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Radio button styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.radio-label:hover {
    background-color: #f0f0f0;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 0.5rem;
    position: relative;
    transition: border-color 0.3s;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #007bff;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: #007bff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Button styles */
.btn-primary, .btn-success {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* Main content styles */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.main-content h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.main-content h3 {
    color: #34495e;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem 0;
}

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

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

/* Alert styles */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-weight: 500;
}

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

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

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

/* Generation details */
.generation-details {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    margin: 2rem 0;
}

.generation-details p {
    margin: 0.5rem 0;
}

/* Results section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Table styles */
.table-container {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background-color: #343a40;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.data-table tbody tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.data-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Responsive design */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

hr {
    border: none;
    height: 1px;
    background-color: #dee2e6;
    margin: 1.5rem 0;
}