/* Light Mode */
:root {
    --primary-bg: #f8f7fa;
    --secondary-bg: #ffffff;
    --tertiary-bg: #e9ecef;
    --border-color: #dee2e6;
    --text-color: #212529;
    --secondary-text-color: #6c757d;
    --header-bg: #ffffff;

    --mor-primary: #6a0dad;
    --mor-dark: #510884;
    --mor-light: #8a2be2;


    --badge-gold-bg: #FFD700;
    --badge-gold-text: #212529;
    --badge-silver-bg: #C0C0C0;
    --badge-silver-text: #ffffff;
    --badge-bronze-bg: #cd7f32;
    --badge-bronze-text: #ffffff;


    --input-bg: #ffffff;
    --input-border: #800080;
    --input-text: #000;
    --input-focus-shadow: rgba(128, 0, 128, 0.25);
    --input-placeholder: #6c757d;

    --navbar-toggler-icon-filter: none;
}

/* Dark Mode */
body.dark-mode {
    --primary-bg: #1a1a1a;
    --secondary-bg: #2a2a2a;
    --tertiary-bg: #3a3a3a;
    --border-color: #4a4a4a;
    --text-color: #f8f9fa;
    --secondary-text-color: #adb5bd;
    --header-bg: #212121;

    --mor-primary: #8a2be2;
    --mor-dark: #6a0dad;
    --mor-light: #a050e0;

    --badge-gold-bg: #FFEB3B;
    --badge-gold-text: #212529;
    --badge-silver-bg: #E0E0E0;
    --badge-silver-text: #212529;
    --badge-bronze-bg: #D7975D;
    --badge-bronze-text: #212529;

    --input-bg: #333333;
    --input-border: #8a2be2;
    --input-text: #f8f9fa;
    --input-focus-shadow: rgba(138, 43, 226, 0.25);
    --input-placeholder: #adb5bd;

    --navbar-toggler-icon-filter: invert(1);
}

body {
    background-color: var(--primary-bg) !important;
    color: var(--text-color) !important;
}

h1, h2, h3, h4, h5, h6, strong, p {
    color: var(--text-color) !important;
}

a {
    color: var(--text-color) !important;
}
a:hover {
    color: var(--mor-primary) !important;
}

.text-dark { color: var(--text-color) !important; }
.text-muted { color: var(--secondary-text-color) !important; }
.text-light { color: var(--text-color) !important; }
.text-white { color: var(--text-color) !important; }


.navbar {
    background-color: var(--header-bg) !important;
    border-color: var(--border-color) !important;
}
.navbar-brand,
.navbar-nav .nav-link,
.navbar-text {
    color: var(--text-color) !important;
}
.navbar-text a {
    color: var(--text-color) !important;
}
.navbar-text a:hover {
    color: var(--mor-primary) !important;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--mor-primary) !important;
}

.navbar-toggler {
    border-color: var(--mor-primary) !important;
}
.navbar-toggler-icon {
    filter: var(--navbar-toggler-icon-filter);
}


.dropdown-menu {
    background-color: var(--secondary-bg);
    border-color: var(--border-color);
}
.dropdown-menu .dropdown-item {
    color: var(--text-color);
}
.dropdown-menu .dropdown-item:hover {
    background-color: var(--tertiary-bg);
    color: var(--text-color);
}
.dropdown-divider {
    border-top-color: var(--border-color) !important;
}


.card {
    background-color: var(--secondary-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}
.card-header {
    background-color: var(--tertiary-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}
.card-body {
    color: var(--text-color) !important;
}


.form-control, .form-select, textarea {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}
.form-control:focus, .form-select:focus, textarea:focus {
    border-color: var(--mor-primary) !important;
    box-shadow: 0 0 0 0.25rem var(--input-focus-shadow) !important;
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
}
.form-control::placeholder, .form-select::placeholder, textarea::placeholder {
    color: var(--input-placeholder) !important;
    opacity: 0.7;
}


footer {
    background-color: var(--header-bg) !important;
    color: var(--secondary-text-color) !important;
}
footer a {
    color: var(--secondary-text-color) !important;
}
footer a:hover {
    color: var(--mor-primary) !important;
}


.alert {
    background-color: var(--secondary-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}
.alert-danger {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-color: #f5c6cb !important;
}
body.dark-mode .alert-danger {
    background-color: #6a0000 !important;
    color: #ffcccc !important;
    border-color: #990000 !important;
}
.alert-warning strong {
    color: var(--text-color) !important;
}

.btn-mor {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--mor-primary);
    --bs-btn-border-color: var(--mor-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--mor-dark);
    --bs-btn-hover-border-color: var(--mor-dark);
    color: white !important;
}

.btn-outline-mor {
    --bs-btn-color: var(--mor-primary);
    --bs-btn-border-color: var(--mor-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--mor-primary);
    --bs-btn-hover-border-color: var(--mor-primary);
}

.d-sm-flex .btn-outline-mor {
    color: var(--mor-primary) !important;
    border-color: var(--mor-primary) !important;
}

.d-sm-flex .btn-outline-mor:hover {
    color: white !important;
    background-color: var(--mor-primary) !important;
}

.navbar .btn {
    color: var(--text-color) !important;
}
.navbar .btn-cikis {
    color: var(--secondary-text-color) !important;
    border-color: var(--border-color) !important;
}
.navbar .btn-cikis:hover {
    background-color: var(--mor-primary) !important;
    color: white !important;
    border-color: var(--mor-primary) !important;
}

.navbar .btn-ara {
    color: var(--mor-primary) !important;
    border-color: var(--mor-primary) !important;
}
.navbar .btn-ara:hover {
    background-color: var(--mor-primary) !important;
    color: white !important;
    border-color: var(--mor-primary) !important;
}

.btn-tema-degistir {
    background-color: var(--mor-primary) !important;
    border-color: var(--mor-primary) !important;
    color: white !important;
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color) !important;
}
.btn-tema-degistir:hover {
    background-color: var(--mor-dark) !important;
    border-color: var(--mor-dark) !important;
}


.badge.bg-gold {
    background-color: var(--badge-gold-bg) !important;
    color: var(--badge-gold-text) !important;
}
.badge.bg-silver {
    background-color: var(--badge-silver-bg) !important;
    color: var(--badge-silver-text) !important;
}
.badge.bg-brown {
    background-color: var(--badge-bronze-bg) !important;
    color: var(--badge-bronze-text) !important;
}

.badge-mor {
    background-color: var(--mor-primary) !important;
    color: white !important;
}

.badge-forum-upvote {
    background-color: var(--mor-primary);
    color: black;
}

body.dark-mode .badge-forum-upvote {
    color: white;
}

.badge-outline-mor {
    color: var(--mor-primary);
    background-color: transparent;
    border: 1px solid var(--mor-primary);
}


.upvote-button.btn-mor {
    background-color: var(--mor-primary);
    border-color: var(--mor-primary);
    color: white;
}
.upvote-button.btn-outline-mor {
    border-color: var(--mor-primary);
    color: var(--mor-primary);
}
.upvote-button.btn-outline-mor:hover {
    background-color: var(--mor-primary);
    color: white;
}


.comment-text-display a {
    color: var(--mor-primary) !important;
}

a:hover {
    color: var(--mor-primary) !important;
}


#search-form select.form-select {
    border-color: var(--mor-primary) !important;
}
#search-form input.form-control {
    border-color: var(--mor-primary) !important;
}
#search-suggestions {
    background-color: var(--secondary-bg);
    border-color: var(--border-color);
}
#search-suggestions .list-group-item {
    background-color: var(--secondary-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}
#search-suggestions .list-group-item:hover { 
    background-color: var(--tertiary-bg) !important;
    color: var(--text-color) !important;
}


#fixed-chat-container .card {
    background-color: var(--secondary-bg) !important;
    border-color: var(--border-color) !important;
}

#fixed-chat-container .card-header {
    background-color: var(--mor-primary) !important;
    color: white !important;
}

#fixed-chat-container .list-group-item {
    background-color: var(--secondary-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

#fixed-chat-container .message-bubble {
    background-color: var(--tertiary-bg);
    color: var(--text-color);
}

#fixed-chat-container .card-footer {
    background-color: var(--tertiary-bg) !important;
    border-top-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

#fixed-chat-container .own-message {
    background-color: var(--mor-primary);
    color: white;
}

#fixed-chat-container input.form-control {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--input-text);
}

#fixed-chat-container .list-group-item:hover {
    background-color: var(--tertiary-bg) !important;
}


.image-upload-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
}
.image-upload-container .btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.image-upload-container:hover .btn {
    opacity: 1;
}
.image-upload-container:hover img {
    filter: brightness(0.7);
}


.nav-tabs {
    border-bottom-color: var(--border-color) !important;
}
.nav-tabs .nav-link {
    color: var(--secondary-text-color) !important;
    border-color: transparent !important;
    background-color: transparent !important;
}
.nav-tabs .nav-link:hover {
    color: var(--mor-primary) !important;
    border-color: transparent !important;
    background-color: transparent !important;
}
.nav-tabs .nav-link.active {
    color: var(--mor-primary) !important;
    font-weight: bold;
    border-bottom-color: var(--mor-primary) !important;
    background-color: transparent !important;
}

.nav-item a {
    color: var(--text-color) !important;
}


.text-mor {
    color: var(--mor-primary) !important;
}
.text-mor:hover {
    color: var(--mor-dark) !important;
}



.list-group-item {
    background-color: var(--secondary-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}


.list-group-item:hover {
    background-color: var(--tertiary-bg) !important;
    color: var(--text-color) !important;
}


.comment-section-container {
    border-radius: 8px;
}
.comment-section-container > .mb-2 {
    margin-bottom: 0px;
}

.comment-card {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--tertiary-bg); 
    color: var(--text-color);
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    box-sizing: border-box;
    gap: 15px;
}


.comment-card > a {
    flex-shrink: 0;
}


.comment-card > .comment-content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}


.comment-wrapper {
    display: flex;
    flex-direction: column; 
    width: 100%;
    margin-bottom: 15;
    box-sizing: border-box;
}


.comment-reply-indent {
    margin-left: 50px;
    border-left: 2px solid var(--border-color);
    padding-left: 15px;
    margin-top: 10px;
    border-radius: 8px;
    padding-top: 5px;
}


.replied-to-user {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.replied-to-user a {
    font-weight: 600 !important;
}

.comment-author-name {
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.comment-timestamp {
    font-size: 0.8em;
    white-space: nowrap;
    margin-left: 5px;
}

.comment-main-content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%; 
}

.comment-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    object-fit: cover;
}


.comment-content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}


.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
}


.comment-timestamp {
    font-size: 0.8em;
    white-space: nowrap;
    margin-left: 5px;
}


.comment-medal {
    font-size: 0.7em;
    margin-left: 4px;
}

.comment-timestamp {
    font-size: 0.8em;
    color: var(--secondary-text-color);
    white-space: nowrap;
}

.comment-text-display {
    word-wrap: break-word;
    white-space: pre-wrap;
    margin-top: 5px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 8px; 
}

.comment-actions .btn {
    font-size: 0.75em;
    padding: 4px 10px;
    border-radius: 16px;
    line-height: 1;
}

.comment-actions .btn-outline-mor {
    border-color: var(--mor-primary);
    color: var(--mor-primary);
}
.comment-actions .btn-outline-mor:hover {
    background-color: var(--mor-primary);
    color: white;
}
.comment-actions .btn-mor {
    background-color: var(--mor-primary);
    border-color: var(--mor-primary);
    color: white;
}
.comment-actions .btn-outline-danger {
    border-color: var(--bs-danger);
    color: var(--bs-danger);
}
body.dark-mode .comment-actions .btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.comment-replies {
    margin-top: 10px;
}


.comment-replies .comment-wrapper {
    margin-left: 0;
    border-left: none;
    margin-top: 0;
}

.comment-replies .comment-card {
    background-color: var(--secondary-bg) !important; 
}


.reply-form-actual-container form {
    display: flex;
    align-items: flex-start;
    width: 100%;
}
.reply-form-actual-container textarea {
    flex-grow: 1;
    margin-right: 10px;
}
.reply-form-actual-container .btn {
    flex-shrink: 0;
}


.form-control, .form-select, textarea {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}
.form-control::placeholder, .form-select::placeholder, textarea::placeholder {
    color: var(--input-placeholder) !important;
    opacity: 0.7;
}
.form-control:focus, .form-select:focus, textarea:focus {
    border-color: var(--mor-primary) !important;
    box-shadow: 0 0 0 0.25rem var(--input-focus-shadow) !important;
}


.comment-form-container {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
    display: flex;
    align-items: flex-start;
}
.comment-form-container textarea {
    border-radius: 20px;
    padding: 8px 15px;
    resize: vertical;
    flex-grow: 1;
    margin-right: 10px;
}
.comment-form-container textarea::placeholder {
    color: var(--input-placeholder);
    opacity: 0.7;
}
.comment-form-container textarea:focus {
    border-color: var(--mor-primary);
    box-shadow: 0 0 0 0.25rem var(--input-focus-shadow);
}
.comment-form-container .btn {
    border-radius: 20px;
    padding: 8px 20px;
    min-width: 80px;
}
.comment-actions + div form {
    padding-top: 10px;
    margin-top: 5px;
}
.comment-actions + div form textarea {
    border-radius: 15px;
    font-size: 0.9em;
}
.comment-actions + div form textarea::placeholder {
    color: var(--input-placeholder);
    opacity: 0.7;
}
.comment-actions + div form textarea:focus {
    border-color: var(--mor-primary);
    box-shadow: 0 0 0 0.25rem var(--input-focus-shadow);
}


body.dark-mode .navbar .btn-mor,
body.dark-mode .navbar .btn-outline-light {
    color: white !important; 
}

body.dark-mode .navbar .btn-outline-light {
    border-color: var(--mor-light) !important; 
    color: var(--mor-light) !important; 
}

body.dark-mode .navbar .btn-outline-light:hover {
    background-color: var(--mor-light) !important;
    color: white !important;
}


footer .list-unstyled li {
    margin-bottom: 0px; 
    padding-top: 2px;   
    padding-bottom: 2px; 
}


footer .list-unstyled {
    margin-bottom: 0; 
    padding-left: 0;  
}





body.dark-mode .accordion-item {
    background-color: var(--secondary-bg) !important; 
    border-color: var(--border-color) !important;     
}

body.dark-mode .accordion-header .accordion-button {
    background-color: var(--tertiary-bg) !important;  
    color: var(--text-color) !important;              
    border-color: var(--border-color) !important;     
}

body.dark-mode .accordion-header .accordion-button:not(.collapsed) {
    background-color: var(--mor-dark) !important;     
    color: white !important;                          
    border-color: var(--mor-dark) !important;         
}

body.dark-mode .accordion-header .accordion-button::after {
    filter: invert(1); 
}

body.dark-mode .accordion-body {
    background-color: var(--secondary-bg) !important; 
    color: var(--text-color) !important;              
    border-top: 1px solid var(--border-color) !important; 
}


body.dark-mode .faq-section p,
body.dark-mode .faq-section h1,
body.dark-mode .faq-section h2,
body.dark-mode .faq-section h3 {
    color: var(--text-color) !important;
}

body.dark-mode .faq-section a {
    color: var(--mor-light) !important;
}

body.dark-mode .faq-section a:hover {
    color: var(--mor-primary) !important;
}


body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode strong,
body.dark-mode p {
    color: var(--text-color) !important;
}

body.dark-mode .accordion-body {
    color: var(--text-color) !important;
}


.verified-badge-gold i.bi-patch-check-fill {
    color: #FFD700;
}


.other-message {
    background-color: var(--tertiary-bg) !important;
    color: var(--text-color) !important;
}

.own-message {
    background-color: var(--mor-primary) !important;
    color: white !important;
}

body.dark-mode .other-message {
    background-color: var(--tertiary-bg) !important;
    color: var(--text-color) !important;
}


.btn-login {
    border-color: var(--mor-primary) !important;
    color: var(--mor-primary) !important;
}
.btn-login:hover {
    background-color: var(--mor-primary) !important;
    color: white !important;
    border-color: var(--mor-primary) !important;
}

body.dark-mode .btn-outline-mor {
    color: var(--mor-light) !important;
    border-color: var(--mor-light) !important;
}

body.dark-mode .btn-outline-mor:hover {
    background-color: var(--mor-light) !important;
    color: white !important;
    border-color: var(--mor-light) !important;
}


.choices__item--selectable {
    background-color: var(--mor-primary) !important;
    border-color: var(--mor-dark) !important;
    color: white !important;
}

.choices__item--selectable .choices__button {
    filter: invert(100%);
}

body.dark-mode .choices__inner {
    background-color: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}

body.dark-mode .choices__list--dropdown {
    background-color: var(--secondary-bg) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode .choices__list--dropdown .choices__item--choice {
    color: var(--text-color) !important;
}

body.dark-mode .choices__list--dropdown .choices__item--choice:hover,
body.dark-mode .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: var(--tertiary-bg) !important;
}

body.dark-mode .choices__input {
    color: var(--input-text) !important;
    background-color: var(--input-bg) !important;
}

.btn-outline-mor:hover {
    color: white !important;
}

.btn-mor:hover {
    color: white !important;
}

#fixed-chat-container .card-header .btn {
    color: white !important;
    border-color: white !important;
}

#fixed-chat-container .card-header .btn:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}


body:not(.dark-mode) .btn-tema-degistir {
    background-color: transparent !important;
    color: var(--mor-primary) !important;
    border-color: var(--mor-primary) !important;
}

body:not(.dark-mode) .btn-tema-degistir:hover {
    background-color: var(--mor-primary) !important;
    color: white !important;
}


body.dark-mode .border-warning.bg-light.bg-opacity-50 {
    background-color: rgba(255, 193, 7, 0.15) !important;
}



.dark-mode .modal-content {
    --bs-modal-bg: #212529;

    color: #dee2e6;
}

.dark-mode .modal-header {
    border-bottom-color: #495057;
}

.dark-mode .modal-footer {
    border-top-color: #495057;
}


.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}


