/* ========================================
   BilenSözlük - Modern Flat Design
   ======================================== */

:root {
    --bs-primary: #1a5f7a;
    --bs-primary-rgb: 26, 95, 122;
    --primary: #1a5f7a;
    --primary-dark: #134b5f;
    --primary-light: #2d8bba;
    --secondary: #57837b;
    --accent: #c38154;
    --accent-hover: #a86d45;
    --success: #2e7d32;
    --warning: #ed6c02;
    --danger: #d32f2f;
    --info: #0288d1;
    
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #f5f5f5;
    
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #7a7a9d;
    --text-light: #a0a0b8;
    
    --border-color: #e8e8f0;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    
    --font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    margin-right: 8px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: var(--border-radius);
    margin: 0 2px;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link i {
    margin-right: 5px;
}

/* Responsive nav text - sadece navbar kapalıyken (lg üstü) yazıları gizle */
@media (min-width: 992px) and (max-width: 1200px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.9rem;
    }
    
    .navbar-nav .nav-link .nav-text {
        display: none;
    }
    
    .navbar-nav .nav-link i {
        margin-right: 0;
        font-size: 1.1rem;
    }
}

/* Mobil menü açıkken yazıları göster */
@media (max-width: 991px) {
    .navbar-collapse .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 1rem;
    }
    
    .navbar-collapse .navbar-nav .nav-link .nav-text {
        display: inline !important;
    }
    
    .navbar-collapse .navbar-nav .nav-link i {
        margin-right: 8px;
        font-size: 1rem;
    }
}

.btn-register {
    background: var(--accent) !important;
    color: white !important;
    border-radius: 20px !important;
    padding: 0.4rem 1rem !important;
}

.btn-register:hover {
    background: var(--accent-hover) !important;
}

@media (max-width: 1200px) {
    .btn-register {
        padding: 0.4rem 0.6rem !important;
    }
}

/* Search Form */
.search-form {
    position: relative; 
    max-width: 100%;
}

@media (max-width: 1400px) {
    .search-form {
        width: 250px;
    }
}

@media (max-width: 1200px) {
    .search-form {
        width: 200px;
    }
}

.search-form .input-group {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    overflow: hidden;
}

.search-form .form-control {
    background: transparent;
    border: none;
    color: white;
    padding-left: 20px;
}

.search-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-form .form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    color: white;
}

.search-form .btn-search {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0 20px;
}

.search-form .btn-search:hover {
    color: white;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
    margin-top: 5px;
}

.search-results.show {
    display: block;
}

.search-results .search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
}

.search-results .search-item:hover {
    background: var(--bg-primary);
}

.search-results .search-item:last-child {
    border-bottom: none;
}

.search-results .entry-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ========================================
   Main Content Layout
   ======================================== */
.main-content {
    padding: 30px 15px;
    min-height: calc(100vh - 200px);
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar-left,
.sidebar-right {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: lowercase;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title i {
    color: var(--accent);
}

/* Topic List in Sidebar */
.topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-list li {
    border-bottom: 1px solid var(--border-color);
}

.topic-list li:last-child {
    border-bottom: none;
}

.topic-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.topic-list a:hover {
    color: var(--primary);
}

.topic-list .count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Stats Section */
.stats-section {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-item .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Quick Entry Form */
.quick-entry textarea {
    resize: none;
    border-radius: var(--border-radius);
}

.quick-entry .btn-primary {
    background: var(--primary);
    border: none;
}

.quick-entry .btn-primary:hover {
    background: var(--primary-dark);
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--accent);
}

.page-subtitle {
    margin-top: 5px;
    font-size: 0.9rem;
}

/* ========================================
   Topic Page
   ======================================== */
.topic-header {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.topic-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.topic-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.topic-meta .meta-item i {
    margin-right: 5px;
}

/* Sort Options */
.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sort-options .btn {
    font-size: 0.8rem;
    padding: 5px 12px;
}

/* Topic List Page */
.topics-list {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.topic-item {
    border-bottom: 1px solid var(--border-color);
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-item .topic-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease;
}

.topic-item .topic-link:hover {
    background: var(--bg-primary);
}

.topic-item .topic-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.topic-item .topic-count {
    font-size: 0.8rem;
    color: white;
    background: var(--primary);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
}

/* Period Filter */
.period-filter {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

/* Today Stats */
.today-stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   Entry Card
   ======================================== */
.entries-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.entry-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.entry-card:hover {
    box-shadow: var(--shadow-md);
}

.entry-topic-title {
    margin-bottom: 12px;
}

.entry-topic-title a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.entry-topic-title a:hover {
    text-decoration: underline;
}

.entry-content {
    margin-bottom: 20px;
}

.entry-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.entry-text a.entry-link {
    color: var(--primary);
    text-decoration: none;
}

.entry-text a.entry-link:hover {
    text-decoration: underline;
}

.entry-text a.topic-ref {
    color: var(--accent);
    font-style: italic;
}

.entry-text a.user-ref {
    color: var(--secondary);
    font-weight: 600;
}

.entry-text em {
    color: var(--text-primary);
    font-style: italic;
}

/* Entry Media */
.entry-media {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.entry-media .media-item {
    max-width: 300px;
}

.entry-media img {
    max-width: 100%;
    border-radius: var(--border-radius);
}

.entry-media video {
    max-width: 100%;
    border-radius: var(--border-radius);
}

/* Entry Footer */
.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.entry-author {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.entry-author:hover {
    text-decoration: underline;
}

.entry-author.rookie {
    color: var(--warning);
}

.entry-date {
    color: var(--text-muted);
}

.entry-edited {
    color: var(--text-light);
    font-style: italic;
}

/* Entry Actions */
.entry-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

.btn-action.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-action.btn-vote.active[data-action="downvote"] {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-action.btn-favorite.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-action.btn-delete:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-action.btn-report:hover {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
}

.vote-info {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-right: 10px;
}

/* ========================================
   New Entry Form
   ======================================== */
.new-entry-form {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.new-entry-form h5 {
    color: var(--text-primary);
    font-weight: 600;
}

.new-entry-form h5 i {
    color: var(--accent);
    margin-right: 8px;
}

.new-entry-form textarea {
    border-radius: var(--border-radius);
    border-color: var(--border-color);
    resize: vertical;
    min-height: 120px;
}

.new-entry-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.login-prompt {
    text-align: center;
}

/* ========================================
   Authentication Pages
   ======================================== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header h2 i {
    color: var(--primary);
    margin-right: 10px;
}

.auth-form .form-control {
    border-radius: var(--border-radius);
    padding: 12px 15px;
    border-color: var(--border-color);
}

.auth-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.auth-form .btn-primary {
    background: var(--primary);
    border: none;
    padding: 12px;
    font-weight: 600;
    border-radius: var(--border-radius);
}

.auth-form .btn-primary:hover {
    background: var(--primary-dark);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* ========================================
   Profile Page
   ======================================== */
.profile-page {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.profile-header {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar .avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
}

.profile-info .profile-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-info .profile-username {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 10px;
}

.profile-info .profile-about {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    gap: 30px;
}

.profile-stats .stat {
    display: flex;
    flex-direction: column;
}

.profile-stats .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.profile-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Create Topic Page
   ======================================== */
.create-topic-form {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.create-topic-form .form-control-lg {
    font-size: 1.25rem;
    padding: 15px;
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.empty-state h4 {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ========================================
   Pagination
   ======================================== */
.pagination-wrapper {
    margin-top: 30px;
}

.pagination .page-link {
    color: var(--primary);
    border-color: var(--border-color);
    padding: 8px 14px;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

.pagination .page-link:hover {
    background-color: var(--bg-primary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-card);
    padding: 25px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

.footer a {
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ========================================
   Alerts & Badges
   ======================================== */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

.badge {
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ========================================
   Form Controls
   ======================================== */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border-color: var(--border-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

/* ========================================
   Dropdown
   ======================================== */
.dropdown-menu {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.dropdown-item {
    padding: 10px 20px;
}

.dropdown-item:hover {
    background-color: var(--bg-primary);
}

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
}

/* ========================================
   Utilities
   ======================================== */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 992px) {
    .sidebar-left {
        display: none !important;
    }
    
    .search-form {
        width: 100%;
        margin: 10px 0;
    }
    
    .main-content {
        padding: 20px 10px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .sidebar-right {
        display: none;
    }
    
    .entry-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .entry-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .topic-header {
        padding: 20px;
    }
    
    .topic-title {
        font-size: 1.4rem;
    }
    
    .auth-card {
        padding: 25px;
        margin: 15px;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.entry-card {
    animation: fadeIn 0.3s ease;
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   External Login Buttons
   ======================================== */
.external-login-section {
    margin-top: 1.5rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-external {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.btn-external:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-external .google-icon {
    flex-shrink: 0;
}

.btn-google {
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #dadce0;
    color: #3c4043;
}

/* reCAPTCHA Styling */
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.g-recaptcha > div {
    transform-origin: center;
}

@media (max-width: 400px) {
    .g-recaptcha > div {
        transform: scale(0.9);
    }
}

