/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

:root {
    --primary-blue: #0a192f;
    /* Navy Blue */
    --hover-blue: #112240;
    --accent-red: #e60023;
    /* Pinterest/Heart Red */
    --bg-color: #f8f9fa;
    --text-dark: #333;
}

body {
    display: flex;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* Hide scrollbars globally but allow scrolling */
::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Sidebar Styles */
.sidebar {
    width: 80px;
    height: 100vh;
    background-color: var(--primary-blue);
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px;
    z-index: 1000;
}

.logo-container {
    margin-bottom: 40px;
}

.logo {
    width: 50px;
    height: 50px;
    background-color: white;
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    font-family: serif;
    /* Stylish L */
}

.nav-links {
    list-style: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.nav-links li a {
    color: #8892b0;
    font-size: 20px;
    text-decoration: none;
    transition: 0.3s;
}

.nav-links li.active a,
.nav-links li a:hover {
    color: white;
}

.user-profile {
    margin-top: auto;
}

.user-profile a {
    color: #ff4d4d;
    font-size: 20px;
    transition: 0.3s;
}

.user-profile a:hover {
    transform: scale(1.2);
    color: #ff3333;
}

/* Highlighted Accounting Menu */
#accounting-nav-item a {
    color: #00d2ff;
    position: relative;
    animation: pulseHighlight 2s infinite;
}

#accounting-nav-item a i {
    font-size: 24px;
    filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.5));
}

@keyframes pulseHighlight {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
        text-shadow: 0 0 10px #00d2ff;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.mobile-nav .accounting-mobile-link {
    color: #00d2ff !important;
    font-size: 28px !important;
}

.login-trigger {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Main Content Area */
.main-content {
    margin-left: 80px;
    /* Space for sidebar */
    width: calc(100% - 80px);
    padding: 20px 40px;
}

/* Header */
.top-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.search-bar {
    flex-grow: 1;
    background: #e9e9e9;
    padding: 12px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 16px;
}

/* Instagram Style Profile Styles */
.profile-info-section {
    max-width: 935px;
    margin: 40px auto;
    display: flex;
    align-items: flex-start;
    gap: 80px;
    padding: 0 20px;
}

.profile-img-container {
    flex-shrink: 0;
}

.profile-large-avatar {
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 4px;
    border-radius: 50%;
}

.profile-large-avatar .inner {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    font-weight: bold;
    color: var(--primary-blue);
    border: 3px solid white;
}

.profile-details {
    flex-grow: 1;
}

.profile-top-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-top-row h2 {
    font-size: 28px;
    font-weight: 300;
}

.edit-profile-btn {
    background: transparent;
    border: 1px solid #dbdbdb;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.profile-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
}

.profile-stats span {
    font-size: 16px;
}

.profile-stats b {
    font-weight: 600;
}

.profile-bio {
    font-size: 16px;
    line-height: 1.5;
}

.profile-bio p {
    color: #262626;
}

/* 3-Column Grid */
.insta-grid {
    max-width: 935px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.insta-post {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #fafafa;
}

.insta-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.insta-post:hover img {
    filter: brightness(0.8);
}

/* Empty State Plus Icon */
.empty-upload-container {
    max-width: 935px;
    margin: 50px auto;
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: 20px;
    border: 1px dashed #dbdbdb;
}

.big-plus-icon {
    width: 80px;
    height: 80px;
    border: 2px solid #262626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 15px;
    cursor: pointer;
    transition: 0.2s;
}

.big-plus-icon:hover {
    background: #fafafa;
    transform: scale(1.05);
}

/* Header User Icon */
.header-user-btn {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s;
}

.header-user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 735px) {
    .profile-info-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .insta-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
    }
}

/* Detail Modal Styling */
.asset-detail-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0;
}

.detail-nav-header {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.back-btn {
    text-decoration: none;
    color: #111;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    transition: 0.2s;
    margin-left: -5px;
    /* Subtle nudge for alignment */
    margin-top: -10px;
    /* Bring it closer to search header */
}

.back-btn:hover {
    color: var(--primary-blue);
}

.asset-main-card {
    background: white;
    border-radius: 32px;
    display: flex;
    overflow: hidden;
    margin-bottom: 60px;
    border: 1px solid #efefef;
}

.top-header {
    height: 80px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: fixed;
    top: 0;
    right: 0;
    left: 80px;
    z-index: 1000;
    border-bottom: 1px solid #efefef;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.main-content {
    margin-left: 80px;
    padding: 100px 40px 40px 40px;
    flex: 1;
}

.header-logo-mobile {
    display: none;
    font-size: 24px;
    font-weight: 900;
    color: white;
    background: var(--primary-blue);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid #efefef;
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.mobile-nav a {
    color: #555;
    font-size: 24px;
    text-decoration: none;
    padding: 10px;
}

.mobile-nav a.active {
    color: var(--primary-blue);
}

.asset-image-side {
    flex: 1;
    background: #fdfdfd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.detail-image-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    background: #f0f0f0;
    padding: 30px;
}

.floating-download-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: 0.3s;
    z-index: 10;
}

.floating-download-btn:hover {
    transform: scale(1.1);
    background: var(--primary-blue);
    color: white;
}

.asset-image-side img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 20px;
    object-fit: contain;
}

.asset-info-side {
    flex: 0.8;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.asset-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.asset-info-header .uploader {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.uploader-avatar {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    color: #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
}

.asset-info-header .actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.share-btn,
.like-btn-detail {
    background: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    color: #111;
}

.share-btn:hover,
.like-btn-detail:hover {
    background: #e2e2e2;
}

.download-action-btn-text {
    background: #f0f0f0;
    color: #111;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s;
}

.download-action-btn-text:hover {
    background: #e2e2e2;
}

.asset-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.asset-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111;
}

.asset-desc {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 30px;
}

.comments-section {
    border-top: 1px solid #efefef;
    padding-top: 20px;
    flex: 1;
}

.section-label {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.comment-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.comment-input-wrapper input {
    flex: 1;
    background: #f0f0f0;
    border: 1px solid transparent;
    padding: 12px 16px;
    border-radius: 24px;
    outline: none;
    font-size: 15px;
    transition: 0.2s;
}

.comment-input-wrapper input:focus {
    background: white;
    border-color: #ddd;
}

.comment-send-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.comment-body {
    flex: 1;
}

.comment-user {
    font-weight: 700;
    font-size: 14px;
}

.comment-text {
    font-size: 14px;
    color: #333;
    margin-top: 2px;
}

.owner-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    border-top: 1px solid #efefef;
    padding-top: 20px;
}

.owner-edit-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.owner-edit-btn:hover {
    background: #e2e2e2;
}

.admin-delete-btn {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
}

.admin-delete-btn:hover {
    background: #fc8181;
    color: white;
}

.related-discovery {
    margin-top: 40px;
}

.related-discovery .section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
}

.related-page-grid {
    column-count: 3;
    column-gap: 20px;
}

.related-page-grid .pin-card {
    margin-bottom: 20px;
    break-inside: avoid;
}

@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .top-header {
        left: 0;
        padding: 0 15px;
    }

    .header-logo-mobile {
        display: flex;
    }

    .header-user-btn {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 80px 15px 80px 15px;
    }

    .profile-info-section {
        margin-top: 10px;
        padding-top: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .mobile-nav {
        display: flex;
    }

    .mobile-nav-user-avatar {
        width: 28px;
        height: 28px;
        background: #eee;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: bold;
        color: #111;
    }

    .mobile-nav a.active .mobile-nav-user-avatar {
        background: var(--primary-blue);
        color: white;
    }

    .asset-main-card {
        flex-direction: column;
        border-radius: 20px;
        margin: 10px 0 30px 0;
        border: 1px solid #efefef;
        overflow: hidden;
        background: white;
    }

    .asset-image-side {
        padding: 0;
        background: #f9f9f9;
        min-height: auto;
    }

    .asset-image-side img {
        border-radius: 20px 20px 0 0;
        width: 100%;
        max-height: none;
        display: block;
    }

    .asset-info-side {
        padding: 20px 15px;
    }

    .asset-container-mobile-fix {
        padding: 0 15px;
    }

    .asset-image-side {
        width: 100%;
    }

    .asset-info-side {
        padding: 20px;
    }

    .related-page-grid {
        column-count: 2;
    }
}

.upload-btn {
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.upload-btn:hover {
    background-color: #1a2f4e;
}

/* Filters */
.filter-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding: 10px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.filter-chip {
    background: white;
    border: 1px solid #efefef;
    padding: 6px 14px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
    white-space: nowrap;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(10, 25, 47, 0.2);
}

/* Pinterest Masonry Grid */
.gallery-grid {
    column-count: 5;
    /* Default columns */
    column-gap: 15px;
}

@media (max-width: 1200px) {
    .gallery-grid {
        column-count: 4;
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        column-count: 3;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 2;
    }
}

/* Image Card Styling */
.pin-card {
    position: relative;
    margin-bottom: 15px;
    border-radius: 16px;
    overflow: hidden;
    break-inside: avoid;
    /* Prevents cutting images */
    cursor: zoom-in;
}

.pin-card img {
    width: 100%;
    display: block;
    border-radius: 16px;
}

/* Hover Overlay */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darkens image */
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

.pin-card:hover .card-overlay {
    opacity: 1;
}

/* Heart & Download Buttons */
.like-btn {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    color: #555;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.like-btn:hover,
.like-btn.liked,
.like-btn-detail.liked {
    background: var(--accent-red) !important;
    color: white !important;
}

.download-action-btn {
    align-self: flex-start;
    background: white;
    color: black;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    transition: 0.2s;
}

.download-action-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

.upload-area {
    border: 2px dashed #ccc;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#imagePreview {
    max-width: 100%;
    max-height: 300px;
    display: none;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.post-btn {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
}

/* Auth Modal Specifics */
.auth-modal-content {
    background-color: var(--primary-blue) !important;
    color: white !important;
    width: 380px !important;
}

.auth-modal-content .close {
    color: white !important;
}

/* Auth Styles */
.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-tab {
    flex: 1;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    transition: 0.3s;
    color: #8892b0;
}

.auth-tab.active {
    border-bottom: 3px solid white;
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #8892b0;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    outline: none;
}

.input-group input:focus {
    border-color: white;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    background: white;
    color: var(--primary-blue);
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.auth-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.login-btn-header {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.login-btn-header:hover {
    background: #1a2f4e;
    transform: translateY(-2px);
}