/* Web Encyclopedia - Modern Minimalist Design */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #1d4ed8;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #2563eb;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Main Content */
.main {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 40px;
    font-family: "Rubik", sans-serif;
    color: rgb(22, 37, 92);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #3f574b;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Section */
.search-section {
    margin-bottom: 4rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #1d4ed8;
    transform: translateY(-50%) scale(1.05);
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}


.section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.articles-grid {
    display: grid;
    gap: 1.5rem;
}

.article-card {
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-title a{
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}

.article-title a:hover {
    color: #9e1d1d;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.popular-item:hover {
    background: #e9ecef;
}

.popular-title a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 400;
}

.popular-title a:hover {
    color: #9e1d1d;
}



/* Article Page */
.article-content {
    background: #f9f7f3;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
}

.article-text a{
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
    text-decoration: none;
}

.article-text a:hover{
    font-size: 1rem;
    line-height: 1.8;
    color: #9e1d1d;
    text-decoration: none;
}
/* Search Results */
.search-results {
    margin-top: 2rem;
}

.search-results h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.result-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.result-excerpt {
    color: #6b7280;
    line-height: 1.6;
}

/* Forms */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
}

.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
}
.autocomplete-wrapper {
    position: relative;
    margin-bottom: 30px;
}

#autocomplete-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    outline: none;
    transition: all 0.3s ease;
}

#autocomplete-input:focus {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 8px;
}

.dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

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

.dropdown-item:hover,
.dropdown-item.highlighted {
    background-color: #f8f9fa;
}

.dropdown-item.selected {
    background-color: #667eea;
    color: white;
}

.hidden {
    visibility:hidden;
    display: none;
}

.loading {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

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

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

.selected-result {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    color: white;
}

.selected-result h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 400;
}

#selected-value {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .container {
        padding: 20px 10px;
    }

    h1 {
        font-size: 2rem;
    }

    #autocomplete-input {
        padding: 14px 16px;
        font-size: 16px; /* iOS zoom'u önlemek için */
    }
}

/* Scrollbar styling */
.dropdown::-webkit-scrollbar {
    width: 6px;
}

.dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
}

.dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.highlight {
    background-color: #f2f2f2;
    padding: 10px;
    border-left: 4px solid #1a5b8a;
    margin-bottom: 20px;
}
.formula {
    font-family: 'Courier New', Courier, monospace;
    background-color: #e9ecef;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    margin: 20px 0;
}