/* Reset and base styles */
* {
    box-sizing: border-box;
}

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

.container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

h1 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 2.5em;
    font-weight: 300;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.2em;
    margin: 0;
}

/* Welcome page styles */
.welcome-card {
    text-align: center;
    padding: 20px;
}

.welcome-card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.feature-list {
    text-align: left;
    margin: 30px 0;
}

.feature-list h3 {
    color: #34495e;
    margin-bottom: 15px;
}

.feature-list ul {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.feature-list li:before {
    content: "✓ ";
    color: #27ae60;
    font-weight: bold;
}

/* Form styles */
.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.form-section h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.4em;
}

.llm-subsection {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border-left: 3px solid #28a745;
}

.llm-subsection h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2em;
}

select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

input[type="password"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="password"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

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

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

.tooltip {
    cursor: help;
    margin-left: 5px;
    color: #007bff;
}

.input-with-help {
    display: flex;
    gap: 10px;
    align-items: center;
}

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

input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.help-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.help-btn:hover {
    background: #5a6268;
}

.field-help {
    margin-top: 8px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 6px;
    font-size: 14px;
    color: #1976d2;
    display: none;
}

.field-help.active {
    display: block;
}

.field-help ul {
    margin: 8px 0;
    padding-left: 20px;
}

.validation-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.validation-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.validation-message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.validation-message.warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ff9800;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
    justify-content: space-between;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: #6c757d;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 5px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dropdown-content button:hover {
    background: #f8f9fa;
}

/* Message styles */
.message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

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

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

.message .icon {
    font-size: 1.2em;
}

.message ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

/* Welcome page styles */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

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

.info {
    color: #6c757d;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: 1px solid #e0e0e0;
        margin-top: 10px;
    }
    
    .actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .form-section {
        padding: 15px;
    }
}

/* Icon styles */
.icon {
    font-style: normal;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}
