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

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

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 40px;
    text-align: center;
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    font-weight: 700;
}

header p {
    font-size: 1.15em;
    opacity: 0.95;
    font-weight: 500;
}

.upload-section {
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.upload-box {
    max-width: 600px;
    margin: 0 auto;
}

.btn-primary, .btn-success {
    border: none;
    padding: 20px 50px;
    font-size: 1.15em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
    display: block;
    margin: 0 auto;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(17, 153, 142, 0.6);
}

#uploadStatus {
    margin-top: 25px;
    padding: 18px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1.05em;
    animation: fadeIn 0.3s ease-out;
}

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

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

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

#analysisSection {
    padding: 50px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

#loadingSection {
    padding: 80px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 7px solid #f3f3f3;
    border-top: 7px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* AKADEMİK MAKALE GÖRÜNÜMÜ */

#resultsSection {
    background: #f5f5f5;
    padding: 40px 20px;
    min-height: 100vh;
}

.article-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

.article-page {
    background: white;
    padding: 2.5cm;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 29.7cm;
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 4px solid #667eea;
}

.article-header h1 {
    font-family: 'Times New Roman', serif;
    font-size: 26pt;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-date {
    font-size: 12pt;
    color: #666;
    margin: 8px 0;
    font-weight: 500;
}

.article-abstract {
    background: #f9f9f9;
    border-left: 5px solid #667eea;
    padding: 25px;
    margin: 30px 0;
    font-family: 'Times New Roman', serif;
    line-height: 1.9;
    border-radius: 8px;
}

.article-abstract h2 {
    font-size: 15pt;
    font-weight: bold;
    margin-bottom: 18px;
    text-transform: uppercase;
    color: #667eea;
}

.abstract-text {
    text-align: justify;
    font-size: 12pt;
    line-height: 2;
    margin-bottom: 18px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.article-keywords {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 2px solid #ddd;
    font-style: italic;
    color: #555;
}

.article-section {
    margin: 35px 0;
    font-family: 'Times New Roman', serif;
    line-height: 1.9;
}

.chart-section {
    margin: 45px 0;
    background: white;
    padding: 25px;
    border-radius: 12px;
}

.article-section h2 {
    font-size: 17pt;
    font-weight: bold;
    color: #333;
    margin: 30px 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #667eea;
}

.article-section h3,
.chart-section h3 {
    font-size: 15pt;
    font-weight: bold;
    color: #444;
    margin: 28px 0 15px 0;
    padding-left: 10px;
    border-left: 4px solid #667eea;
}

.article-section h4 {
    font-size: 13pt;
    font-weight: bold;
    color: #555;
    margin: 22px 0 12px 0;
}

.article-section p {
    text-align: justify;
    margin: 14px 0;
    font-size: 12pt;
    color: #333;
    line-height: 1.9;
}

.article-section ul {
    margin: 18px 0;
    padding-left: 45px;
}

.article-section ul li {
    margin: 10px 0;
    font-size: 12pt;
    line-height: 1.8;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-family: 'Times New Roman', serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stats-table th,
.stats-table td {
    border: 1px solid #333;
    padding: 14px;
    text-align: left;
    font-size: 11.5pt;
}

.stats-table th {
    background-color: #667eea;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

.stats-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.stats-table tr:hover {
    background-color: #e9ecef;
}

/* AI YORUM KUTUSU - GELİŞTİRİLMİŞ */

.ai-commentary {
    background: linear-gradient(135deg, #fff8dc 0%, #fffaed 100%);
    border-left: 6px solid #ffa500;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    font-family: 'Times New Roman', serif;
    line-height: 2;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.15);
}

.ai-commentary h4 {
    color: #856404;
    font-size: 14pt;
    margin-bottom: 18px;
    font-weight: bold;
    border-bottom: 3px solid #ffd700;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-commentary p,
.ai-comment-text,
.ai-comment-text p {
    font-size: 12pt;
    color: #333;
    text-align: justify;
    line-height: 2;
    margin: 14px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ai-comment-text strong {
    color: #667eea;
    font-weight: 700;
}

.ai-comment-text em {
    color: #11998e;
    font-style: italic;
}

/* GRAFİK KONTEYNERI - GELİŞTİRİLMİŞ */

.chart-container {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.chart-wrapper {
    background: white;
    padding: 25px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin: 20px 0;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chart-wrapper canvas {
    max-width: 100% !important;
    max-height: 400px !important;
    width: auto !important;
    height: auto !important;
}

#wordCloud {
    max-width: 100% !important;
    max-height: 400px !important;
}

/* NETWORK GRAFİKLERİ İÇİN ÖZEL STILLER */

.network-link {
    stroke: #999;
    stroke-opacity: 0.6;
}

.network-node {
    cursor: pointer;
}

.network-node:hover {
    stroke-width: 4px;
}

.network-label {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    pointer-events: none;
    user-select: none;
}

/* THEMATIC MAP STYLES */

#thematicMap svg {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
}

.figure-caption {
    text-align: center;
    font-style: italic;
    font-size: 11.5pt;
    color: #666;
    margin: 18px 0 12px 0;
    font-family: 'Times New Roman', serif;
    font-weight: 600;
}

/* DOWNLOAD BUTONU - GELİŞTİRİLMİŞ */

.download-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
    z-index: 1000;
}

.download-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 35px rgba(102, 126, 234, 0.7);
}

.download-button:active {
    transform: translateY(-2px);
}

/* DETAYLI ANALİZ MODAL - GELİŞTİRİLMİŞ */

#detailedModal {
    animation: fadeIn 0.3s ease-out;
}

#detailedModal h2 {
    font-size: 24px;
    font-weight: 700;
}

#detailedModal textarea {
    font-family: inherit;
    line-height: 1.6;
}

#detailedModal textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#detailedModal button {
    transition: all 0.3s ease;
}

#detailedModal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ANIMASYONLAR */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* RESPONSIVE TASARIM */

@media (max-width: 1200px) {
    .article-container {
        max-width: 100%;
    }
    
    .article-page {
        padding: 1.5cm;
    }
    
    .chart-wrapper {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    header p {
        font-size: 1em;
    }
    
    .article-page {
        padding: 1cm;
        min-height: auto;
    }
    
    .article-header h1 {
        font-size: 20pt;
    }
    
    .chart-wrapper {
        min-height: 350px;
        padding: 15px;
    }
    
    .chart-wrapper canvas {
        max-height: 300px !important;
    }
    
    .download-button {
        bottom: 15px;
        right: 15px;
        padding: 16px 30px;
        font-size: 15px;
    }
    
    .stats-table {
        font-size: 10pt;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .upload-section,
    #analysisSection {
        padding: 30px 20px;
    }
    
    .btn-primary,
    .btn-success {
        padding: 16px 35px;
        font-size: 1em;
    }
    
    .article-page {
        padding: 15px;
    }
    
    .article-section h2 {
        font-size: 14pt;
    }
    
    .article-section h3 {
        font-size: 12pt;
    }
    
    .ai-commentary {
        padding: 18px;
    }
    
    .chart-container {
        padding: 15px;
    }
}

/* PRINT STYLES */

@media print {
    body {
        background: white;
    }
    
    .upload-section,
    #analysisSection,
    #loadingSection,
    .download-button {
        display: none !important;
    }
    
    .article-page {
        page-break-after: always;
        box-shadow: none;
        margin: 0;
        padding: 2cm;
    }
    
    .chart-container,
    .chart-section {
        page-break-inside: avoid;
    }
    
    .ai-commentary {
        page-break-inside: avoid;
    }
    
    .stats-table {
        page-break-inside: avoid;
    }
    
    .article-section h2,
    .article-section h3,
    .chart-section h3 {
        page-break-after: avoid;
    }
}

/* SCROLLBAR ÖZELLEŞTIRME */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* TOOLTIP STYLES */

.tooltip {
    position: absolute;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1000;
}

/* NETWORK VISUALIZATION ENHANCEMENTS */

svg {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

svg text {
    font-size: 12px;
    fill: #333;
}

svg line {
    stroke-opacity: 0.6;
}

svg circle {
    transition: all 0.3s ease;
}

/* BADGE STYLES */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10pt;
    font-weight: 600;
    margin: 0 4px;
}

.badge-primary {
    background: #667eea;
    color: white;
}

.badge-success {
    background: #11998e;
    color: white;
}

.badge-warning {
    background: #ffa500;
    color: white;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

/* HIGHLIGHT STYLES */

.highlight {
    background: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* CARD STYLES */

.info-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 5px solid #667eea;
}

.info-card h4 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 14pt;
}

.info-card p {
    font-size: 12pt;
    line-height: 1.8;
    color: #555;
}

/* PROGRESS BAR */

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

/* ACCESSIBILITY ENHANCEMENTS */

button:focus,
input:focus,
textarea:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* DARK MODE SUPPORT (opsiyonel) */

@media (prefers-color-scheme: dark) {
    /* Dark mode stilleri buraya eklenebilir */
}

/* SELECTION COLORS */

::selection {
    background: #667eea;
    color: white;
}

::-moz-selection {
    background: #667eea;
    color: white;
}

/* LOADING STATES */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ERROR STATES */

.error-message {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    padding: 15px;
    color: #c33;
    margin: 15px 0;
}

/* SUCCESS STATES */

.success-message {
    background: #efe;
    border: 2px solid #cfc;
    border-radius: 8px;
    padding: 15px;
    color: #3c3;
    margin: 15px 0;
}