/* Genel Sayfa Stilleri */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #f3f4f6; /* Modern, hafif gri arka plan */
    color: #1f2937;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1600px; /* Daha geniş bir layout için */
    margin: 0 auto;
    padding: 2rem;
}

/* Başlık Alanı */
header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative; /* Hamburger butonu için */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}
.header-content h1 {
    flex: 1;
    text-align: center;
    margin: 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0;
    flex-grow: 1; /* Başlığın mevcut alanı doldurmasını sağlar */
    text-align: center; /* Metni ortalar */
}

header p {
    font-size: 1.1rem;
    color: #4b5563;
    max-width: 600px;
    margin: 0.5rem auto 0 auto;
}

/* Hamburger Menü Butonu */
.hamburger-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin-left: 0;
    margin-right: 1rem;
    order: -1;
}
.hamburger-menu-btn .line {
    width: 28px;
    height: 4px;
    background: #333;
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger-menu-btn.open .line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-menu-btn.open .line:nth-child(2) {
    opacity: 0;
}
.hamburger-menu-btn.open .line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Ana Menü (Navigasyon) */
.main-menu {
    display: none;
    background: #f8f8f8;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 0.5rem 1rem;
}
.main-menu.open {
    display: block;
}
.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
@media (min-width: 700px) {
    .main-menu ul {
        flex-direction: row;
        gap: 1.5rem;
    }
}
.main-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.main-menu a.active, .main-menu a:hover {
    background: #e0e0e0;
}

/* Responsive Menü */
@media (max-width: 768px) {
    .hamburger-menu-btn {
        display: block;
    }

    .main-menu {
        display: none; /* Varsayılan olarak gizli */
        flex-direction: column;
        position: absolute;
        top: 100px; /* Header'ın altına */
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 1rem 0;
        border-radius: 0;
    }

    .main-menu.open {
        display: flex;
    }

    .main-menu ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .main-menu a {
        padding: 0.75rem 1.5rem;
        text-align: center;
    }
}

/* Kart Stili */
.card {
    background-color: #ffffff;
    border-radius: 0.75rem; /* Daha yuvarlak köşeler */
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Giriş Alanı */
.input-card {
    padding: 1.5rem;
}

.input-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.form-controls {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.input-group {
    flex: 1 1 200px;
    min-width: 200px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

input[type="text"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box; /* Genişlik ve padding sorunlarını çözer */
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.button-group {
    flex-shrink: 0;
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

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

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-secondary:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

/* Sonuçlar Alanı */
#results {
    margin-top: 2rem;
}

.placeholder-container {
    text-align: center;
    padding: 4rem;
    color: #6b7280;
    font-size: 1.1rem;
}

.loading-container,
.error-container {
    text-align: center;
    padding: 4rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.error-container .error {
    color: #ef4444;
}

/* Grafik Alanı */
.charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-wrapper {
    position: relative;
    height: 400px; /* Sabit yükseklik */
}

/* Analiz Detayları */
#analysis-details h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

#analysis-details .warning {
    background-color: #fefce8;
    color: #a16207;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.analysis-table th, .analysis-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.analysis-table th {
    font-weight: 600;
    width: 35%;
    color: #4b5563;
}

.analysis-table tr:last-child th,
.analysis-table tr:last-child td {
    border-bottom: none;
}

.text-muted { color: #6b7280; }
.positive { color: #16a34a; }
.negative { color: #dc2626; }

/* Modal Stilleri */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 2rem;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-button {
    background: none;
    border: none;
    color: #888;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.5rem;
    transition: color 0.2s;
    outline: none;
    box-shadow: none;
    position: relative;
    top: 0;
    right: 0;
    z-index: 10;
}
.close-button:hover, .close-button:focus {
    color: #e53935;
    background: none;
}

.modal-footer {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background-color: #fff;
    color: #4b5563;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-size: 1.2rem;
}

.share-btn:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

@media print {
    body, .modal-content { 
        background-color: white !important; 
        box-shadow: none !important; 
        border: none !important; 
    }
    .modal-header, .modal-footer, .input-card, header p { 
        display: none !important; 
    }
    .modal { 
        position: static !important; 
        display: block !important; 
    }
    .modal-content { 
        width: 100% !important; 
        max-width: 100% !important; 
        margin: 0 !important; 
        padding: 0 !important; 
    }
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    body { padding: 1rem; }
    .container { width: 100%; }
    .input-section { flex-direction: column; align-items: stretch; }
    .button-group { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
}

/* AI Analysis Sayfası Stilleri */
.model-selection-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.model-selector {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.model-selector:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.model-selector:hover {
    border-color: #94a3b8;
}

.btn-icon {
    margin-right: 0.5rem;
    font-size: 1.1em;
}

.analysis-content {
    min-height: 200px;
    margin: 2rem 0;
}

.content-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 2rem;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    text-align: center;
}

.content-placeholder p {
    margin: 0;
    color: #64748b;
    font-size: 1.1rem;
}

.analysis-result {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

.analysis-result p {
    margin: 0 0 1rem 0;
    color: #374151;
}

.page-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .model-selection-section {
        padding: 1rem;
    }
    
    .analysis-content {
        margin: 1rem 0;
    }
    
    .content-placeholder {
        min-height: 150px;
        padding: 1.5rem;
    }
    
    .analysis-result {
        padding: 1.5rem;
    }
}
