/* Skrytí všech scroll barů */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE a Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body {
    margin: 0;
    padding-bottom: 50px;
    background: #0c0c0c;
    font-family: 'Segoe UI', sans-serif;
    color: #fff;
    overflow-x: hidden;
}

/* HEADER */
header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    padding: 10px 20px;
    border-bottom: 1px solid #333;
    z-index: 20;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: bold;
    color: #B38875;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo:hover .header-logo {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(179, 136, 117, 0.5));
}

nav {
    display: flex;
    gap: 25px;
}

.nav-item {
    cursor: pointer;
    position: relative;
    padding: 6px 12px;
    border-radius: 6px;
    opacity: 0.8;
    transition: 0.2s;
}

.nav-item:hover {
    background: #222;
    opacity: 1;
}

.nav-item.active {
    font-weight: bold;
    color: #B38875;
    background: #1a1a1a;
    opacity: 1;
}

.notif {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff3b3b;
    border-radius: 50%;
    top: 0;
    right: -5px;
    display: none;
}

/* BUTTON */
.add-btn {
    background: #B38875;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.add-btn:hover {
    background: #B38875;
}

/* Tlačítko "Přidat příspěvek" - jen rámeček */
.header-actions .add-btn,
#addPostBtn {
    background: transparent;
    border: 2px solid #B38875;
    color: #B38875;
}

.header-actions .add-btn:hover,
#addPostBtn:hover {
    background: rgba(179, 136, 117, 0.1);
    border-color: #c99a88;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#userInfo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 2px solid #B38875;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.user-profile:hover {
    background: rgba(179, 136, 117, 0.1);
    border-color: #c99a88;
}

.user-profile-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #B38875;
    display: block;
    flex-shrink: 0;
}

.user-profile span {
    color: #B38875;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.modal-content label {
    display: block;
    margin-bottom: 5px;
    color: #ddd;
    font-size: 14px;
    font-weight: 500;
}

#userName {
    color: #B38875;
    font-weight: 600;
    font-size: 14px;
}

#authButtons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* FEED */
.feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: #151515;
    border-radius: 15px;
    border: 1px solid #333;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.card:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.card .card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    justify-content: space-between;
}

.card .card-header .name {
    font-weight: 600;
}

.pet-nickname {
    font-weight: 400;
    font-size: 0.9em;
    color: #B38875;
    opacity: 0.8;
    margin-left: 5px;
}

.detail-header h2 .pet-nickname {
    font-size: 0.85em;
}

.card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    background: #1a1a1a;
    cursor: pointer;
    transition: opacity 0.2s;
    display: block;
}

.card img:hover {
    opacity: 0.9;
}

.card .card-body {
    padding: 10px;
}

.card .card-body p {
    margin: 5px 0;
    font-size: 14px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #B38875;
}

.post-author .author-label {
    font-weight: 500;
    opacity: 0.8;
}

.post-author .author-name {
    font-weight: 600;
    color: #c99a88;
}

.card .card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.detail-actions-icons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    backdrop-filter: blur(6px);
    background: rgba(0,0,0,0.75);
    justify-content: center;
    align-items: center;
    z-index: 50;
    pointer-events: auto;
}

.modal-content {
    pointer-events: auto;
}

.modal-content {
    background: #111;
    padding: 30px;
    width: 420px;
    max-width: 90vw;
    border-radius: 15px;
    border: 1px solid #333;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #fff;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    opacity: 1;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.modal-close:hover {
    background: rgba(255, 59, 59, 0.9);
    border-color: #ff3b3b;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 59, 59, 0.5);
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content textarea {
    width: calc(100% - 26px);
    margin: 0;
    padding: 12px;
    background: #222;
    border: 2px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: #222;
    border: 2px solid #333;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #B38875;
    font-weight: 500;
    font-size: 14px;
    box-sizing: border-box;
}

.file-input-text {
    display: inline-block;
}

.file-input-label:hover {
    background: #252525;
    border-color: #B38875;
}

.file-input-label.error {
    border-color: #ff3b3b;
    background: #2a1a1a;
}

.image-preview {
    position: relative;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a1a1a;
    max-width: 100%;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-image-btn:hover {
    background: rgba(255, 59, 59, 0.9);
    transform: scale(1.1);
}

.profile-image-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    width: 100%;
}

.profile-crop-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #1a1a1a;
}

.profile-crop-container img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.crop-circle {
    position: absolute;
    border: 3px solid #B38875;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    pointer-events: all;
    cursor: move;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.crop-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.profile-image-preview img.final {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #B38875;
    display: block;
    max-width: 120px;
    max-height: 120px;
}

.current-profile-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-profile-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #B38875;
    display: block;
}

.remove-profile-btn {
    font-size: 12px;
    padding: 6px 12px;
}

.modal-content input[type="text"]:focus,
.modal-content input[type="email"]:focus,
.modal-content input[type="password"]:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #B38875;
    background: #252525;
}

.modal-content input[type="text"].error,
.modal-content input[type="email"].error,
.modal-content input[type="password"].error,
.modal-content textarea.error {
    border-color: #ff3b3b;
    background: #2a1a1a;
}

.modal-content textarea {
    min-height: 80px;
    resize: vertical;
}

.error-message {
    display: block;
    color: #ff3b3b;
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #B38875;
    text-align: center;
}

.modal-switch {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    opacity: 0.7;
}

.modal-content a {
    color: #B38875;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-content a:hover {
    color: #c99a88;
    text-decoration: underline;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    padding: 8px 14px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn.cancel {
    background: transparent;
    border: 2px solid #ff3b3b;
    color: #ff3b3b;
}

.btn.cancel:hover {
    background: #ff3b3b;
    color: #fff;
}

.btn.cancel:hover {
    background: #555;
}

.btn.add {
    background: #B38875;
    color: #fff;
}

.btn.add:hover {
    background: #B38875;
}

.add-btn.liked {
    background: #ff3b3b;
    opacity: 0.8;
}

.add-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* DETAIL MODAL */
.detail-img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 600px;
    border-radius: 12px;
    margin-bottom: 10px;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.comment-box {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
}

.comment-input {
    flex: 1;
    padding: 12px;
    background: #222;
    border: 2px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
}

.comment-input:focus {
    outline: none;
    border-color: #B38875;
    background: #252525;
}

.comment-submit-btn {
    padding: 12px 20px;
    white-space: nowrap;
}

.comments-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.comment-item {
    background: #1a1a1a;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 3px solid #B38875;
    transition: all 0.2s;
}

.comment-item:hover {
    background: #222;
    transform: translateX(5px);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12px;
}

.comment-author-name {
    font-weight: 600;
    color: #B38875;
}

.comment-author-pet {
    font-weight: 400;
    color: #c99a88;
    opacity: 0.8;
    font-size: 0.9em;
}

.comment-content {
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
}

.no-comments {
    opacity: 0.6;
    font-style: italic;
    text-align: center;
    padding: 20px;
    color: #888;
}

.login-prompt {
    opacity: 0.7;
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
}

.login-link {
    color: #B38875;
    text-decoration: underline;
    cursor: pointer;
}

.login-link:hover {
    color: #c99a88;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.detail-desc {
    margin: 15px 0;
    line-height: 1.6;
    color: #ddd;
}

.detail-actions-menu {
    display: flex;
    gap: 10px;
}

.edit-post-btn, .delete-post-btn {
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.edit-post-btn:hover {
    background: #2a2a2a;
    border-color: #B38875;
}

.delete-post-btn:hover {
    background: #3a1a1a;
    border-color: #ff3b3b;
}

.card-actions-menu {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.nui-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 50px;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 10px;
    z-index: 10;
}

    .footer-logo {
        height: 30px;
}

.nui-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 30;
}

.header-logo {
    height: 30px;
    width: auto;
    transition: all 0.3s ease;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        padding: 10px 15px;
    }

    .logo {
        font-size: 20px;
    }

    .logo span {
        display: none;
    }

    nav {
        order: 3;
        width: 100%;
        justify-content: space-around;
        margin-top: 10px;
        gap: 10px;
    }

    .nav-item {
        font-size: 13px;
        padding: 6px 8px;
    }

    .header-actions {
        gap: 8px;
    }

    .add-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .modal-content {
        width: 95vw;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .feed {
        padding: 15px;
        grid-template-columns: 1fr;
    }

    .card {
        border-radius: 12px;
    }

    .modal-content h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 8px 10px;
    }

    .logo {
        font-size: 18px;
    }

    .header-logo {
        height: 24px;
    }

    nav {
        gap: 5px;
    }

    .nav-item {
        font-size: 11px;
        padding: 5px 6px;
    }

    .add-btn {
        font-size: 11px;
        padding: 5px 10px;
    }

    .btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .modal-content {
        padding: 15px;
    }

    .image-preview img {
        max-height: 250px;
        max-width: 100%;
    }
    
    .profile-image-preview img {
        width: 100px;
        height: 100px;
    }
    
    .card img {
        height: 250px;
    }
    
    .detail-img {
        max-height: 400px;
    }

    .file-input-label {
        padding: 10px;
        font-size: 13px;
    }

    #userInfo {
        flex-direction: column;
        gap: 5px;
    }

    #userName {
        font-size: 12px;
    }

    #authButtons {
        flex-direction: column;
        gap: 5px;
    }
}

/* IKONKY - VELIKOSTI */
.action-icon {
    width: 18px !important;
    height: 18px !important;
    object-fit: contain !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.post-icon {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain;
    max-width: 20px !important;
    max-height: 20px !important;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}

.date-icon {
    width: 14px !important;
    height: 14px !important;
    object-fit: contain;
    max-width: 14px !important;
    max-height: 14px !important;
    opacity: 0.7;
    display: inline-block;
}

.section-icon {
    width: 18px !important;
    height: 18px !important;
    object-fit: contain;
    max-width: 18px !important;
    max-height: 18px !important;
    vertical-align: middle;
    margin-right: 5px;
    display: inline-block;
}

.btn-icon {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain;
    max-width: 16px !important;
    max-height: 16px !important;
    vertical-align: middle;
    display: inline-block;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: #888;
    opacity: 0.8;
}

.post-date span {
    display: inline-block;
}

.post-date-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
    font-size: 13px;
    color: #888;
    opacity: 0.8;
}

.post-date-detail span {
    display: inline-block;
}

/* IKONKY - STYLY */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px 8px;
    gap: 6px;
    position: relative;
    overflow: visible;
}

.icon-btn img,
.icon-btn .action-icon {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    object-fit: contain !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
    max-width: 18px !important;
    max-height: 18px !important;
}

.icon-btn:hover {
    background: #252525;
    border-color: #B38875;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 136, 117, 0.3);
}

.icon-btn.active.liked {
    background: linear-gradient(135deg, #3a1a1a 0%, #4a2a2a 100%);
    border-color: #ff3b3b;
    box-shadow: 0 0 12px rgba(255, 59, 59, 0.4);
}

.icon-btn.active.disliked {
    background: linear-gradient(135deg, #2a1a2a 0%, #3a2a3a 100%);
    border-color: #9b59b6;
    box-shadow: 0 0 12px rgba(155, 89, 182, 0.4);
}

.icon-btn.commented:hover {
    border-color: #3498db;
    box-shadow: 0 0 12px rgba(52, 152, 219, 0.3);
}

.icon-btn.shared:hover {
    border-color: #2ecc71;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.3);
}

.icon-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.icon-btn img,
.icon-btn .action-icon {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    object-fit: contain !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
}

.action-icons-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* NOTIFIKACE */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #111;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #333;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    min-width: 250px;
    animation: slideIn 0.3s ease;
}

.notification.error.confirm {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    min-width: 350px;
    text-align: center;
}

.notification.show {
    display: block;
}

.notification.success {
    border-color: #4caf50;
    background: #1a3a1a;
}

.notification.error {
    border-color: #ff3b3b;
    background: #3a1a1a;
}

.notification.info {
    border-color: #B38875;
    background: #2a1f1a;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}