/* === RESET I PODSTAWY === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f2f5;
}

/* === LAYOUT === */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

/* === NAWIGACJA === */
.navbar {
    padding: 10px 0;
    background: #ff5733;
    color: whitesmoke;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.navbar h1 {
    font-size: 24px;
}

.navbar-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.navbar span {
    font-weight: bold;
    color: white;
    margin-right: 5px;
}

.navbar-profile-link {
    white-space: nowrap;
    margin-right: 0 !important;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 4px;
}

.navbar a:hover {
    background: #166fe5;
    transform: translateY(-2px);
}

.navbar > .container > .navbar-left > a {
    background: none;
    padding: 0;
}

.navbar > .container > .navbar-left > a:hover {
    background: none;
    transform: none;
}

.navbar img {
    cursor: pointer;
}

.navbar-profile-link {
    white-space: nowrap;
}

.navbar {
    padding: 10px 0;
    background: #ff5733;
    color: whitesmoke;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* === WYSZUKIWARKA === */
.search-form {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 400px;
	margin-right:10px;
}

.search-input {
    padding: 8px 16px 8px 35px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    width: 100%;
    font-size: 14px;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: white;
    font-weight: bold;
}

.search-input:focus {
    outline: none;
    background: #166fe5;
}

.search-button {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    color: white;
    transition: none;
}

.search-button:hover {
    background: none;
    transform: none;
}

/* === WYNIKI WYSZUKIWANIA === */
.search-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-user-item .post-avatar {
    width: 32px;
    height: 32px;
    font-size: 16px;
}

/* === KARTY === */
.card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card h2 {
    margin-bottom: 15px;
}

/* === POSTY === */
.post {
    border-bottom: 1px solid #e4e6eb;
    padding: 15px 0;
}

.post:last-child {
    border-bottom: none;
}

.post-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.post-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ff5733;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    flex-shrink: 0;
}

.post-username {
    font-weight: bold;
    color: #ff5733;
    text-decoration: none;
}

.post-username:hover {
    color: #166fe5;
}

.post-time {
    font-size: 12px;
    color: #65676b;
    margin-left: 5px;
}

.post-content {
    margin: 10px 0 10px 42px;
    line-height: 1.5;
}

.post-header {
    font-weight: bold;
    color: #ff5733;
    margin-bottom: 8px;
}

.post-header a {
    color: #ff5733;
    text-decoration: none;
}

.post-header a:hover {
    color: #166fe5;
}

/* === FORMULARZE === */
input,
textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Arial, sans-serif;
}

textarea {
    resize: vertical;
}

button {
    background: #ff5733;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

button:hover {
    background: #166fe5;
}

/* === KOMUNIKATY === */
.error {
    color: red;
    margin: 10px 0;
}

.success {
    color: green;
    margin: 10px 0;
    padding: 10px;
    background: #d4edda;
    border-radius: 4px;
}

/* === LISTA UŻYTKOWNIKÓW === */
.user-list {
    list-style: none;
}

.user-list li {
    padding: 10px;
    border-bottom: 1px solid #e4e6eb;
}

.user-list li:last-child {
    border-bottom: none;
}

.user-list a {
    text-decoration: none;
    color: #ff5733;
    transition: color 0.3s ease;
}

.user-list a:hover {
    color: #166fe5;
}

/* === LINKI === */
a {
    transition: color 0.3s ease;
}

/* === PROFIL === */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ff5733;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
}

.profile-info h2 {
    margin-bottom: 5px;
}

.profile-stats {
    color: #65676b;
    font-size: 14px;
    margin: 5px 0;
}

.btn-message {
    display: inline-block;
    background: #ff5733;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.btn-message:hover {
    background: #166fe5;
}

/* === FLOATING ACTION BUTTON (FAB) === */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ff5733;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 999;
}

.fab:hover {
    background: #166fe5;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.fab-icon {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

/* === CARD WRAPPER === */
.card-wrapper {
    position: relative;
}

.card-wrapper.placeholder-active {
    min-height: 200px;
}

/* === STICKY POST SECTION === */
.sticky-post {
    position: fixed !important;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 780px;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 20px 0 !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* === ANIMACJA FEEDU === */
.feed-slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-10px);
    }
}

/* === ANIMACJA POWROTU === */
.feed-slide-down {
    animation: slideDownFeed 0.4s ease-out;
}

@keyframes slideDownFeed {
    from {
        transform: translateY(-10px);
    }
    to {
        transform: translateY(0);
    }
}

/* === IKONA USTAWIEŃ W ROGU === */
.navbar-settings-corner {
    position: absolute;
    top: 15px;
    right: 20px;
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.navbar-settings-corner:hover {
    background: #166fe5 !important;
    transform: scale(1.1) rotate(90deg);
}

.settings-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    transition: none;
}

.navbar-settings:hover .settings-icon {
    transform: rotate(45deg);
}

/* === USTAWIENIA === */
.settings-section {
    padding: 20px 0;
    border-bottom: 1px solid #e4e6eb;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    margin-bottom: 15px;
    color: #ff5733;
}

.settings-section p {
    margin: 10px 0;
}

/* === PRZYCISK DRUGORZĘDNY === */
.btn-secondary {
    background: #e4e6eb;
    color: #050505;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #d0d2d6;
}

body.dark-mode .btn-secondary {
    background: #3a3b3c;
    color: #e4e6eb;
}

body.dark-mode .btn-secondary:hover {
    background: #4a4b4c;
}

/* === ROZWIJANY FORMULARZ === */
.collapsible-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
    margin-top: 0;
}

.collapsible-form.active {
    max-height: 400px;
    margin-top: 15px;
}

.collapsible-form form {
    padding-top: 10px;
}

.settings-section p {
    margin: 10px 0;
}

/* === TRYB CIEMNY === */
body.dark-mode {
    background: #18191a;
    color: #e4e6eb;
}

body.dark-mode .navbar {
    background: #242526;
}

body.dark-mode .card {
    background: #242526;
    color: #e4e6eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .post {
    border-bottom: 1px solid #3a3b3c;
}

body.dark-mode input,
body.dark-mode textarea {
    background: #3a3b3c;
    border: 1px solid #3a3b3c;
    color: #e4e6eb;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #b0b3b8;
}

body.dark-mode .success {
    background: #1f3a2e;
    color: #4caf50;
}

body.dark-mode .post-time {
    color: #b0b3b8;
}

body.dark-mode .profile-stats {
    color: #b0b3b8;
}

body.dark-mode .user-list li {
    border-bottom: 1px solid #3a3b3c;
}

/* === PRZEŁĄCZNIK TRYBU === */
.theme-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.theme-toggle label {
    font-size: 16px;
    font-weight: bold;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    appearance: none;
    background: #ccc;
    border-radius: 13px;
    outline: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch:checked {
    background: #ff5733;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-switch:checked::before {
    transform: translateX(24px);
}

body.dark-mode .settings-section h3 {
    color: #ff5733;
}

body.dark-mode .settings-section p {
    color: #b0b3b8;
}

/* === KONTROLKI ROZMIARU CZCIONKI === */
.font-size-control {
    margin-top: 20px;
}

.font-size-control label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
}

.font-size-buttons {
    display: flex;
    gap: 10px;
}

.font-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #e4e6eb;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    color: #050505;
}

.font-btn[data-size="small"] {
    font-size: 14px;
}

.font-btn[data-size="normal"] {
    font-size: 18px;
}

.font-btn[data-size="large"] {
    font-size: 22px;
}

.font-btn[data-size="xlarge"] {
    font-size: 26px;
}

.font-btn:hover {
    border-color: #ff5733;
    background: #fff5f3;
}

.font-btn.active {
    border-color: #ff5733;
    background: #ff5733;
    color: white;
}

body.dark-mode .font-btn {
    background: #3a3b3c;
    border-color: #4a4b4c;
    color: #e4e6eb;
}

body.dark-mode .font-btn:hover {
    background: #4a4b4c;
    border-color: #ff5733;
}

body.dark-mode .font-btn.active {
    background: #ff5733;
    border-color: #ff5733;
}

/* === ROZMIARY CZCIONKI === */
body.font-small {
    font-size: 12px;
}

body.font-small .post-content {
    font-size: 12px;
}

body.font-small h2 {
    font-size: 18px;
}

body.font-small h3 {
    font-size: 16px;
}

body.font-normal {
    font-size: 14px;
}

body.font-large {
    font-size: 16px;
}

body.font-large .post-content {
    font-size: 16px;
}

body.font-large h2 {
    font-size: 26px;
}

body.font-large h3 {
    font-size: 22px;
}

body.font-xlarge {
    font-size: 18px;
}

body.font-xlarge .post-content {
    font-size: 18px;
}

body.font-xlarge h2 {
    font-size: 30px;
}

body.font-xlarge h3 {
    font-size: 26px;
}

/* === WYSOKI KONTRAST === */
body.high-contrast {
    background: #000000;
    color: #ffffff;
}

body.high-contrast .navbar {
    background: #000000;
    border-bottom: 3px solid #ffff00;
}

body.high-contrast .card {
    background: #000000;
    color: #ffffff;
    border: 3px solid #ffff00;
}

body.high-contrast .post {
    border-bottom: 2px solid #ffff00;
}

body.high-contrast input,
body.high-contrast textarea {
    background: #000000;
    border: 2px solid #ffff00;
    color: #ffffff;
}

body.high-contrast button {
    background: #ffff00;
    color: #000000;
    border: 2px solid #ffff00;
    font-weight: bold;
}

body.high-contrast button:hover {
    background: #000000;
    color: #ffff00;
}

body.high-contrast .navbar a {
    background: #ffff00;
    color: #000000;
}

body.high-contrast .navbar a:hover {
    background: #000000;
    color: #ffff00;
    border: 2px solid #ffff00;
}

body.high-contrast .post-avatar {
    background: #ffff00;
    color: #000000;
    border: 2px solid #ffff00;
}

body.high-contrast .post-username,
body.high-contrast .post-header a {
    color: #ffff00;
    font-weight: bold;
}

body.high-contrast .fab {
    background: #ffff00;
    border: 3px solid #ffff00;
}

body.high-contrast .fab:hover {
    background: #000000;
    border: 3px solid #ffff00;
}

body.high-contrast .success {
    background: #000000;
    color: #00ff00;
    border: 2px solid #00ff00;
}

body.high-contrast .search-input {
    background: #000000;
    border: 2px solid #ffff00;
}

body.high-contrast .search-input::placeholder {
    color: #ffff00;
}

body.high-contrast .user-list li {
    border-bottom: 2px solid #ffff00;
}

body.high-contrast .navbar-settings-corner {
    background: #ffff00 !important;
    border: 2px solid #ffff00;
}

body.high-contrast .settings-icon {
    filter: brightness(0);
}

/* === UPLOAD MEDIÓW === */
.media-upload {
    margin: 10px 0;
}

.media-label {
    display: inline-block;
    background: #e4e6eb;
    color: #050505;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.media-label:hover {
    background: #d0d2d6;
}

#media-input {
    display: none;
}

#file-name {
    margin-left: 10px;
    color: #65676b;
    font-size: 14px;
}

body.dark-mode .media-label {
    background: #3a3b3c;
    color: #e4e6eb;
}

body.dark-mode .media-label:hover {
    background: #4a4b4c;
}

/* === WYŚWIETLANIE MEDIÓW === */
.post-media {
    margin: 15px 0 10px 42px;
    border-radius: 8px;
    overflow: hidden;
}

.post-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.post-video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.post-file {
    display: inline-block;
    background: #e4e6eb;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    color: #050505;
    font-weight: bold;
    transition: background 0.3s ease;
}

.post-file:hover {
    background: #ff5733;
    color: white;
}

body.dark-mode .post-file {
    background: #3a3b3c;
    color: #e4e6eb;
}

body.dark-mode .post-file:hover {
    background: #ff5733;
}

/* === UPLOAD MEDIÓW === */
.media-upload {
    margin: 10px 0;
}

.media-label {
    display: inline-block;
    background: #e4e6eb;
    color: #050505;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.media-label:hover {
    background: #d0d2d6;
}

#media-input {
    display: none;
}

#file-name {
    margin-left: 10px;
    color: #65676b;
    font-size: 14px;
}

body.dark-mode .media-label {
    background: #3a3b3c;
    color: #e4e6eb;
}

body.dark-mode .media-label:hover {
    background: #4a4b4c;
}

/* === WYŚWIETLANIE MEDIÓW === */
.post-media {
    margin: 15px 0 10px 42px;
    border-radius: 8px;
    overflow: hidden;
}

.post-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.post-video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.post-file {
    display: inline-block;
    background: #e4e6eb;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    color: #050505;
    font-weight: bold;
    transition: background 0.3s ease;
}

.post-file:hover {
    background: #ff5733;
    color: white;
}

body.dark-mode .post-file {
    background: #3a3b3c;
    color: #e4e6eb;
}

body.dark-mode .post-file:hover {
    background: #ff5733;
}

/* === EDYCJA PROFILU === */
.profile-edit-section {
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid #e4e6eb;
}

.profile-edit-section:last-of-type {
    border-bottom: none;
}

.profile-edit-section h3 {
    margin-bottom: 10px;
    color: #ff5733;
}

.current-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 10px 0;
    display: block;
}

.current-banner {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin: 10px 0;
    display: block;
}

.no-avatar, .no-banner {
    padding: 20px;
    background: #f0f2f5;
    border-radius: 8px;
    text-align: center;
    color: #65676b;
    margin: 10px 0;
}

.btn-cancel {
    display: inline-block;
    background: #e4e6eb;
    color: #050505;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    margin-left: 10px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-cancel:hover {
    background: #d0d2d6;
}

body.dark-mode .btn-cancel {
    background: #3a3b3c;
    color: #e4e6eb;
}

body.dark-mode .btn-cancel:hover {
    background: #4a4b4c;
}

body.dark-mode .no-avatar,
body.dark-mode .no-banner {
    background: #3a3b3c;
}

/* === BANER PROFILU === */
.profile-banner {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 8px 8px 0 0;
    margin-bottom: -50px;
}

.profile-avatar-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .profile-avatar-img {
    border-color: #18191a;
}

.profile-bio {
    margin: 10px 0;
    color: #050505;
}

body.dark-mode .profile-bio {
    color: #e4e6eb;
}

/* === MAŁE AVATARY W POSTACH === */
.post-avatar-img-link {
    flex-shrink: 0;
}

.post-avatar-img-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* === STYLE BANERÓW === */
.profile-banner {
    width: 100%;
    height: 250px;
    border-radius: 8px 8px 0 0;
    margin-bottom: -50px;
}

.banner-style-cover {
    background-size: cover;
    background-position: center;
}

.banner-style-contain {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f0f2f5;
}

.banner-style-repeat {
    background-size: auto;
    background-position: top left;
    background-repeat: repeat;
}

body.dark-mode .banner-style-contain {
    background-color: #242526;
}

/* === SELEKTOR STYLU BANERA === */
.banner-style-selector {
    margin-top: 20px;
}

.banner-style-selector h4 {
    margin-bottom: 15px;
    color: #050505;
}

body.dark-mode .banner-style-selector h4 {
    color: #e4e6eb;
}

.banner-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.banner-option {
    cursor: pointer;
    border: 2px solid #e4e6eb;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.banner-option:hover {
    border-color: #ff5733;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.banner-option input[type="radio"] {
    display: none;
}

.banner-option input[type="radio"]:checked + .option-preview {
    color: #ff5733;
}

.banner-option input[type="radio"]:checked ~ .option-preview .preview-box {
    border-color: #ff5733;
}

.option-preview {
    text-align: center;
}

.preview-box {
    width: 100%;
    height: 80px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 2px solid #e4e6eb;
    transition: border-color 0.3s ease;
}

.option-preview span {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.option-preview small {
    display: block;
    color: #65676b;
    font-size: 12px;
}

body.dark-mode .banner-option {
    border-color: #3a3b3c;
    background: #242526;
}

body.dark-mode .banner-option:hover {
    border-color: #ff5733;
}

body.dark-mode .preview-box {
    border-color: #3a3b3c;
}

/* === PODGLĄD BANERA W EDYCJI === */
.banner-preview-container {
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
}

.current-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-style-contain.current-banner {
    object-fit: contain;
    background: #f0f2f5;
}

.banner-style-repeat.current-banner {
    object-fit: none;
    object-position: top left;
}

body.dark-mode .banner-style-contain.current-banner {
    background: #242526;
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 768px) {
    .banner-options {
        grid-template-columns: 1fr;
    }
}

/* === SYSTEM REAKCJI (FASOLKA) === */
.reaction-pill {
    display: inline-flex;
    margin: 10px 0 0 42px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e4e6eb;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    border-right: 1px solid #e4e6eb;
}

.reaction-btn:last-child {
    border-right: none;
}

.reaction-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.reaction-icon {
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

.reaction-count {
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

/* Plus (pomarańczowy) */
.reaction-plus {
    color: #ff5733;
}

.reaction-plus:hover:not(:disabled) {
    background: #fff5f3;
    transform: scale(1.05);
}

.reaction-plus.active {
    background: #ff5733;
    color: white;
}

.reaction-plus.active .reaction-icon,
.reaction-plus.active .reaction-count {
    color: white;
}

/* Minus (jasnoniebieski) */
.reaction-minus {
    color: #166fe5;
}

.reaction-minus:hover:not(:disabled) {
    background: #e7f3ff;
    transform: scale(1.05);
}

.reaction-minus.active {
    background: #166fe5;
    color: white;
}

.reaction-minus.active .reaction-icon,
.reaction-minus.active .reaction-count {
    color: white;
}

/* Tryb ciemny */
body.dark-mode .reaction-pill {
    border-color: #3a3b3c;
}

body.dark-mode .reaction-btn {
    background: #242526;
    border-right-color: #3a3b3c;
}

body.dark-mode .reaction-plus {
    color: #ff5733;
}

body.dark-mode .reaction-plus:hover:not(:disabled) {
    background: #3a2620;
}

body.dark-mode .reaction-plus.active {
    background: #ff5733;
    color: white;
}

body.dark-mode .reaction-minus {
    color: #166fe5;
}

body.dark-mode .reaction-minus:hover:not(:disabled) {
    background: #1a2942;
}

body.dark-mode .reaction-minus.active {
    background: #166fe5;
    color: white;
}

/* Wysoki kontrast */
body.high-contrast .reaction-pill {
    border: 3px solid #ffff00;
}

body.high-contrast .reaction-btn {
    background: #000000;
    border-right: 3px solid #ffff00;
}

body.high-contrast .reaction-plus,
body.high-contrast .reaction-minus {
    color: #ffff00;
}

body.high-contrast .reaction-plus:hover:not(:disabled),
body.high-contrast .reaction-minus:hover:not(:disabled) {
    background: #ffff00;
    color: #000000;
}

body.high-contrast .reaction-plus.active {
    background: #ff5733;
    color: #000000;
    border: 2px solid #ffff00;
}

body.high-contrast .reaction-minus.active {
    background: #166fe5;
    color: #000000;
    border: 2px solid #ffff00;
}

/* Animacja kliknięcia */
.reaction-btn:active:not(:disabled) {
    transform: scale(0.95);
}

/* Responsywność */
@media (max-width: 768px) {
    .reaction-pill {
        margin-left: 0;
    }
    
    .reaction-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .reaction-icon {
        font-size: 16px;
    }
}

/* === MENU USTAWIEŃ POSTA (Z IKONĄ settings1.png) === */

/* Kontener menu (pozycjonowanie względem posta) */
.post-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-menu {
    position: relative;
    margin-left: auto;
}

/* === PRZYCISK ⚙️ === */
.post-menu-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    z-index: 5;
}

.post-menu-btn:hover {
    background: #166fe5;
    transform: scale(1.1) rotate(90deg);
}

/* Ikona wewnątrz przycisku */
.post-menu-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(0); /* ciemna ikona na jasnym tle */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.post-menu-btn:hover .post-menu-icon {
    filter: brightness(0) invert(1); /* biała ikona przy hoverze */
    transform: rotate(90deg);
}

/* === ROZWIJANE MENU === */
.post-menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
}

.post-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === ELEMENTY MENU === */
.menu-item {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #050505;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0;
    transition: background 0.2s ease;
}

.menu-item:hover {
    background: #f0f2f5;
}

.delete-btn {
    color: #dc3545;
}

.delete-btn:hover {
    background: #fff0f0;
}

/* === TRYB CIEMNY === */
body.dark-mode .post-menu-btn {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .post-menu-icon {
    filter: brightness(0) invert(1); /* jasna ikona */
}

body.dark-mode .post-menu-btn:hover {
    background: #166fe5;
    transform: scale(1.1) rotate(90deg);
}

body.dark-mode .post-menu-dropdown {
    background: #242526;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .menu-item {
    color: #e4e6eb;
}

body.dark-mode .menu-item:hover {
    background: #3a3b3c;
}

body.dark-mode .delete-btn:hover {
    background: #3a2020;
}

/* === WYSOKI KONTRAST === */
body.high-contrast .post-menu-btn {
    background: #ffff00;
    border: 2px solid #ffff00;
}

body.high-contrast .post-menu-icon {
    filter: brightness(0);
}

body.high-contrast .post-menu-btn:hover {
    background: #000;
    border-color: #ffff00;
    transform: scale(1.1) rotate(90deg);
}

body.high-contrast .post-menu-dropdown {
    background: #000;
    border: 3px solid #ffff00;
}

body.high-contrast .menu-item {
    color: #ffff00;
}

body.high-contrast .menu-item:hover {
    background: #ffff00;
    color: #000;
}

body.high-contrast .delete-btn {
    color: #ff0000;
}

/* === NOWY PRZYCISK KOMENTARZY === */
.comment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ff5733; /* kolor główny */
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.comment-btn:hover {
    background-color: #ff704d; /* jaśniejszy pomarańczowy */
    transform: scale(1.08);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

.comment-icon {
    width: 21px;
    height: 21px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* biała ikona */
}

/* === Tryb ciemny === */
body.dark-mode .comment-btn {
    background-color: #ff5733;
    box-shadow: none;
}

body.dark-mode .comment-btn:hover {
    background-color: #ff704d;
    transform: scale(1.08);
}

body.dark-mode .comment-icon {
    filter: brightness(0) invert(1);
}

/* === Wysoki kontrast === */
body.high-contrast .comment-btn {
    background: #000;
    border: 2px solid #ffff00;
}

body.high-contrast .comment-btn:hover {
    background: #ffff00;
    transform: scale(1.08);
}

body.high-contrast .comment-icon {
    filter: brightness(1);
}

/* === STRONA POSTA + KOMENTARZE === */
.post-detail-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 10px;
}

/* Post główny na stronie szczegółów */
.post-detail-container .card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-detail-container .post {
    border-bottom: none;
    padding: 0;
}

.post-detail-container .post-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.post-detail-container .post-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-detail-container .post-content {
    margin: 10px 0 10px 42px;
    line-height: 1.5;
}

.post-detail-container .post-media {
    margin: 15px 0 10px 42px;
    border-radius: 8px;
    overflow: hidden;
}

.post-detail-container .reaction-pill {
    margin: 10px 0 0 42px;
}

/* Tryb ciemny dla post detail */
body.dark-mode .post-detail-container .card {
    background: #242526;
    color: #e4e6eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Wysoki kontrast dla post detail */
body.high-contrast .post-detail-container .card {
    background: #000000;
    color: #ffffff;
    border: 3px solid #ffff00;
}

/* Sekcja komentarzy */
.comments-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.comments-section h2 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Formularz komentarzy */
.comment-form {
    padding: 15px 0;
    border-bottom: 1px solid #e4e6eb;
    margin-bottom: 15px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    resize: vertical;
}

.comment-form button {
    background: #ff5733;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.comment-form button:hover {
    background: #166fe5;
}

/* Komentarze - stylizowane jak posty */
.comment-list {
    display: flex;
    flex-direction: column;
}

.comment {
    border-bottom: 1px solid #e4e6eb;
    padding: 15px 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-avatar,
.comment-avatar-text {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-avatar-text {
    background: #ff5733;
    color: white;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.comment-username {
    font-weight: bold;
    color: #ff5733;
    text-decoration: none;
}

.comment-username:hover {
    color: #166fe5;
}

.comment-time {
    font-size: 12px;
    color: #65676b;
    margin-left: 5px;
}

.comment-content {
    margin: 10px 0 10px 42px;
    line-height: 1.5;
}

/* Brak komentarzy */
.no-comments {
    text-align: center;
    color: #65676b;
    font-style: italic;
    padding: 20px 0;
}

/* === TRYB CIEMNY - KOMENTARZE === */
body.dark-mode .comments-section {
    background: #242526;
    color: #e4e6eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .comment {
    border-bottom: 1px solid #3a3b3c;
}

body.dark-mode .comment-form {
    border-bottom: 1px solid #3a3b3c;
}

body.dark-mode .comment-form textarea {
    background: #3a3b3c;
    border: 1px solid #3a3b3c;
    color: #e4e6eb;
}

body.dark-mode .comment-form textarea::placeholder {
    color: #b0b3b8;
}

body.dark-mode .comment-time {
    color: #b0b3b8;
}

body.dark-mode .no-comments {
    color: #b0b3b8;
}

/* === WYSOKI KONTRAST - KOMENTARZE === */
body.high-contrast .comments-section {
    background: #000000;
    color: #ffffff;
    border: 3px solid #ffff00;
}

body.high-contrast .comment {
    border-bottom: 2px solid #ffff00;
}

body.high-contrast .comment-form {
    border-bottom: 2px solid #ffff00;
}

body.high-contrast .comment-form textarea {
    background: #000000;
    border: 2px solid #ffff00;
    color: #ffffff;
}

body.high-contrast .comment-avatar-text {
    background: #ffff00;
    color: #000000;
    border: 2px solid #ffff00;
}

body.high-contrast .comment-username {
    color: #ffff00;
    font-weight: bold;
}

body.high-contrast .no-comments {
    color: #ffff00;
}
/* Sekcja tła profilu */
.profile-edit-section h3 {
    margin-bottom: 10px;
}

/* Gdy użytkownik nie ma tła */
.no-background {
    width: 100%;
    padding: 20px;
    background: #f0f2f5;
    border: 2px dashed #ccc;
    color: #777;
    text-align: center;
    border-radius: 10px;
}

/* Podgląd aktualnego tła profilu */
.background-preview-container {
    width: 100%;
    max-width: 500px;
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Sam obraz tła — proporcje 16:9 */
.current-background {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Input pliku dla tła */
input[name="background"] {
    margin-top: 10px;
}
