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

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

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

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.header h1 {
    color: #667eea;
    font-size: 24px;
}

.nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-info {
    color: #666;
    margin-right: 15px;
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-large {
    padding: 15px 40px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.main {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero {
    text-align: center;
    padding: 40px 0;
}

.hero h2 {
    color: #333;
    font-size: 32px;
    margin-bottom: 15px;
}

.hero p {
    color: #666;
    font-size: 18px;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-card p {
    color: #666;
    font-size: 14px;
}

.auth-container {
    max-width: 400px;
    margin: 0 auto;
}

.auth-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.auth-card h2 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    color: #555;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.form-group small {
    color: #999;
    font-size: 12px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.message {
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    display: none;
}

.message.error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.message.success {
    background: #efe;
    color: #0a0;
    border: 1px solid #cfc;
}

.hidden {
    display: none !important;
}

.dashboard-section {
    margin-bottom: 30px;
}

.dashboard-section h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.ask-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.input-group input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

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

.answer-display {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-display .placeholder {
    color: #999;
    font-size: 16px;
}

.answer-display .answer {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.answer-display .error {
    color: #c00;
    font-size: 16px;
}

.answer-display .loading {
    color: #667eea;
    font-size: 18px;
}

.note {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-top: 15px;
}

.api-key-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.api-key-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.api-key-item .label {
    color: #666;
    font-size: 14px;
}

.api-key-item .value {
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.api-key-item .value.success {
    color: #0a0;
}

.api-key-item .value.warning {
    color: #f90;
}

.api-key-item .value.danger {
    color: #c00;
}

.loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
    font-size: 14px;
}
