/* Temel stil tanımlamaları */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #27ae60;
    --border-radius: 5px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Genel stil sıfırlama */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f8fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header stili */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

header nav ul {
    display: flex;
    list-style: none;
}

header nav ul li {
    margin-left: 1rem;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

header nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
}

/* Ana içerik */
main {
    padding: 2rem 0;
}

/* Chat uygulaması stilleri */
.chat-container {
    height: 70vh;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
    box-shadow: var(--box-shadow);
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: var(--border-radius);
}

.user-message {
    background-color: #e3f2fd;
    text-align: right;
    margin-left: 20%;
}

.assistant-message {
    background-color: #f5f5f5;
    margin-right: 20%;
}

.message p {
    margin: 0;
}

.message-meta {
    font-size: 0.8rem;
    color: #777;
    margin-top: 5px;
}

.loading {
    display: none;
    text-align: center;
    margin: 10px 0;
    color: var(--dark-color);
}

.loading-dots {
    display: inline-block;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

/* Form stilleri */
.input-form {
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
}

.input-group input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.input-group button:hover {
    background-color: #2980b9;
}

/* Giriş ve kayıt formları */
.auth-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.auth-container h1 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-full {
    width: 100%;
}

/* Alert mesajları */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Geçmiş sayfası için stil */
.history-list {
    list-style: none;
}

.history-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.history-item:hover {
    background-color: #f8f9fa;
}

.history-item a {
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item a:hover {
    color: var(--primary-color);
}

.history-date {
    color: #777;
    font-size: 0.9rem;
}

/* Footer stili */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 0;
    text-align: center;
    margin-top: 2rem;
}

footer p {
    margin: 0;
}

/* Duyarlı tasarım */
@media (max-width: 768px) {
    .chat-container {
        height: 60vh;
    }
    
    .user-message {
        margin-left: 10%;
    }
    
    .assistant-message {
        margin-right: 10%;
    }
}