/* GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Reddit Sans', sans-serif; 
}

body {
    background: #FAFAFC; /* Softer white base to let cards stand out */
}

/* SIDEBAR STRUCTURE */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 92px;
    height: 100vh;
    background: #5848CB;
    padding: .4rem .8rem;
    transition: .5s ease;
    z-index: 999;
}

.sidebar.active {
    width: 250px;
}

.sidebar.active ~ .main-content {
    left: 250px;
    width: calc(100% - 250px);
}

/* MENU HAMBURGER BUTTON */
.sidebar #btn {
    position: absolute;
    top: 15px;
    right: 50%;
    transform: translate(50%, 0);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.5s ease;
}

.sidebar.active #btn {
    right: 15px;
    transform: translate(0, 0);
}

/* LOGO & BRANDING HEADERS */
.sidebar-header {
    width: 100%;
    margin-top: 70px;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.sidebar.active .sidebar-header {
    justify-content: flex-start;
    padding-left: 10px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.logo-link img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    transition: .4s ease;
}

.sidebar.active .logo-link img {
    width: 60px;
    height: 60px;
}

.logo-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: .3s ease;
    font-size: 1.4rem;
    font-weight: 700;
    white-space: nowrap;
}

.sidebar.active .logo-link span {
    opacity: 1;
    width: auto;
}

/* NAVIGATION ITEM LISTS */
.nav-list {
    margin-top: 20px;
}

.sidebar ul li {
    list-style: none;
    margin: 10px 0;
    position: relative;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: .3s ease;
    height: 50px;
}

.sidebar ul li a:hover {
    background: white;
    color: #5848CB;
}

.sidebar ul li a i {
    min-width: 68px; 
    line-height: 50px;
    text-align: center;
    font-size: 1.4rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-item {
    opacity: 0;
    transition: .3s ease;
    white-space: nowrap;
}

.sidebar.active .nav-item {
    opacity: 1;
}

/* TOOLTIPS ON HOVER */
.tooltip {
    position: absolute;
    left: 125px;
    top: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: black;
    padding: 5px 12px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.sidebar ul li:hover .tooltip {
    opacity: 1;
}

.sidebar.active .tooltip {
    display: none !important;
}

/* MAIN APPS PAGE LAYOUT */
.main-content {
    position: relative;
    left: 92px;
    width: calc(100% - 92px);
    min-height: 100vh;
    padding: 2rem;
    transition: .5s ease;
}

/* TOP BAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search-bar {
    width: 65%;
    background: #ECE7FF;
    padding: 12px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-bar input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    color: #333;
}

.search-bar i {
    color: #8B7CDA;
}

.top-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.circle-icon {
    width: 44px;
    height: 44px;
    background: #ECE7FF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5848CB;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.circle-icon:hover {
    background: #DFD9FF;
}

.profile {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #5848CB;
}

/* CONTENT WRAPPERS */
.content-wrapper {
    display: flex;
    gap: 35px;
    align-items: flex-start;
}

.feed {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* FEED HEADER POPULAR / FILTERS */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popular-btn,
.filter-btn {
    border: 2px solid #5848CB;
    background: white;
    color: #5848CB;
    padding: 10px 20px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.popular-btn:hover,
.filter-btn:hover {
    background: #ECE7FF;
}

/* POST CARDS */
.post {
    background: white;
    border: 2.5px solid #5848CB;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 6px 6px 0px rgba(88, 72, 203, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px rgba(88, 72, 203, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 2px solid #ECE7FF;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #5848CB;
}

.user-info .username {
    font-weight: 700;
    color: #222;
}

.post-media-container {
    width: 100%;
    background: #F4F3FF;
    display: flex;
    justify-content: center;
    align-items: center;
}

.post-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.post-footer {
    padding: 16px;
    border-top: 2px solid #ECE7FF;
    background: white;
}

.post-icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    color: #5848CB;
}

.post-icons i {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.post-icons i:hover {
    transform: scale(1.15);
}

.left-icons {
    display: flex;
    gap: 20px;
}

.caption {
    margin-top: 14px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.caption b {
    color: #000;
    margin-right: 6px;
}

/* CONTAINER PARA SA BUONG KANANG SIDE */
.right-sidebar-container {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Heto ang namamahala sa pagitan ng Corner Board at Challenge List */
    width: 340px;
    position: sticky;
    top: 30px; 
}

/* CRITIQUE BOARD */
.feedback-board {
    background: white;
    padding: 24px 16px;
    border: 2px solid #B4A7FF;
    border-radius: 24px;
    max-height: calc(100vh - 180px); /* Ibinaba para magkasya ang challenge card sa ilalim */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feedback-board h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #000;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
}

.challenge-list {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Nagbibigay ng sapat na space sa pagitan ng dalawang magkaibang challenge card */
}
/* LIST ENGINE - DITO TINAGO ANG SCROLLBAR AT PINILIT MAGING VERTICAL FLUID */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden; /* Pinigilan ang horizontal scroll */
    padding-right: 4px;
    
    /* Para matago ang default styling ng scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.feedback-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

/* CRITIQUE CARD ROW ENGINE */
.critique-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px;
    transition: transform 0.2s ease;
    cursor: pointer;
    width: 100%;
}

.critique-card:hover {
    transform: translateX(4px); 
}

.critique-preview-img {
    width: 85px;
    height: 85px;
    object-fit: cover;
    border-radius: 14px; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    flex-shrink: 0; 
}

.critique-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    flex: 1;
}

.critique-details .user-handle {
    font-size: 13px;
    font-weight: 700;
    color: #444;
}

.critique-details .critique-text {
    font-size: 13px;
    color: #222;
    line-height: 1.3;
    word-break: break-word;
}

.critique-details .stars {
    color: #000; 
    font-size: 11px;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* MINI WIDGET DESIGN */
.mini-widget-card {
    background: #5848CB;
    color: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 6px 6px 0px rgba(88, 72, 203, 0.15);
}

.mini-widget-card h3 {
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.mini-widget-card p {
    font-size: 15px;
    margin-bottom: 4px;
}

.mini-widget-card .widget-sub {
    font-size: 11px;
    opacity: 0.8;
}

/* INTERACTIVE DROPDOWNS & UTILITY PANELS */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    left: 0;
    background: white;
    border: 2px solid #5848CB;
    border-radius: 12px;
    width: 160px;
    display: none;
    flex-direction: column;
    box-shadow: 4px 4px 0px rgba(88, 72, 203, 0.15);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    padding: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
    font-weight: 600;
}

.dropdown-item:hover {
    background: #ECE7FF;
    color: #5848CB;
}

.dropdown-item.active {
    background: #5848CB;
    color: white;
}

.filter-wrapper {
    position: relative;
    display: inline-block;
}

.filter-panel {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border: 2px solid #5848CB;
    border-radius: 12px;
    width: 180px;
    display: none;
    flex-direction: column;
    box-shadow: 4px 4px 0px rgba(88, 72, 203, 0.15);
    z-index: 1000;
    overflow: hidden;
}

.filter-panel.show {
    display: flex;
}

.filter-option, .filter-reset {
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
    font-weight: 600;
}

.filter-option:hover {
    background: #ECE7FF;
    color: #5848CB;
}

.filter-reset {
    border-top: 2px dashed #ECE7FF;
    color: #ff2a6d;
    text-align: center;
}

.filter-reset:hover {
    background: #ffecec;
}

/* BADGES */
.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: #ff2a6d; 
    border-radius: 50%;
    box-shadow: 0 0 0 2px white;
}

.badge.hide {
    display: none;
}