/* Peraside - True Black Dark & Premium Theme */

/* Import modern fonts and icons */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Poppins:wght@600&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css');

/* General Reset */
body {
    background-color: #0B0B0B;
    color: #F8FAFC;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Add spacing for fixed navbar */
.container {
    padding-top: 80px;
}

/* Headings */
h1, h2, h3, h4, h5 {
    font-family: 'Poppins', sans-serif;
    color: #F8FAFC;
}

/* Links */
a {
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #8B5CF6;
}

/* Navbar */
.navbar {
    background: #1A1A1A;
    padding: 10px 20px;
    border-bottom: 1px solid #2C2C2C;
    z-index: 9999;
}
.navbar-brand img {
    height: 40px;
}

/* Sidebar */
.sidebar {
    background: #1A1A1A;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.sidebar a {
    display: block;
    padding: 10px;
    color: #94A3B8;
    border-radius: 8px;
    transition: background 0.3s ease, color 0.3s ease;
}
.sidebar a:hover {
    background: #2C2C2C;
    color: #3B82F6;
}

/* Feed Cards */
.post-card {
    background: #1C1C1C;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}
.post-card:hover {
    transform: translateY(-2px);
}

/* Post Header: Avatar + Name + Bio */
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.post-header .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #2C2C2C;
}
.post-header strong {
    font-weight: 600;
    font-size: 1rem;
    color: #F8FAFC;
}
.user-bio {
    font-size: 0.9rem;
    color: #D1D5DB;
    background: #121212;
    padding: 8px 12px;
    border-radius: 12px;
    margin-top: 4px;
    line-height: 1.4;
    word-break: break-word;
}

/* Post Content */
.post-content p {
    font-size: 0.95rem;
    color: #E5E7EB;
    margin: 0 0 10px 0;
}

/* Action Buttons: Like, Comment, Share */
.post-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.post-actions button {
    background: #2C2C2C;
    border: none;
    color: #F8FAFC;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.post-actions button:hover {
    background: #3B82F6;
    color: #fff;
    transform: translateY(-1px);
}
.post-actions button i {
    font-size: 14px;
}

/* Guest login/register form */
.guest-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 400px;
    width: 100%;
    padding: 40px 30px;
    background: #1A1A1A;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 999;
}
.guest-form h2 {
    text-align: center;
    margin-bottom: 20px;
}
.guest-form .form-control {
    background: #121212;
    color: #E0E0E0;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 15px;
}
.guest-form .form-control::placeholder {
    color: #A0A0A0;
}
/* ===== Password input with eye icon fully rounded ===== */
.input-group.password-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}

.input-group.password-wrapper .form-control {
    border-radius: 12px !important;
    padding-right: 45px; /* Space for the eye icon */
    height: 45px;
    border: 1px solid #333;
    background: #121212;
    color: #E0E0E0;
}

.input-group.password-wrapper .input-group-text {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    color: #ccc;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 5;
    width: 30px;
    height: 30px;
}

.input-group.password-wrapper .input-group-text:hover {
    color: #3B82F6;
}


/* Buttons */
.btn,
input[type="button"],
input[type="submit"],
button.custom-btn {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.btn:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
button.custom-btn:hover {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.7);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .guest-form {
        width: 90%;
        max-width: 400px;
        padding: 30px 20px;
    }
    .navbar-collapse {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-top: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        background-color: #1A1A1A;
    }
    .navbar-collapse.show {
        max-height: 500px;
    }
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Navbar User Dropdown */
.navbar-nav .dropdown-toggle {
    background: #1A1A1A;
    border-radius: 12px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.navbar-nav .dropdown-toggle:hover,
.navbar-nav .dropdown-toggle:focus {
    background: #2C2C2C;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* Avatar inside navbar */
.navbar-nav .dropdown-toggle img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #2C2C2C;
}

/* Dropdown arrow animation */
.navbar-nav .dropdown-toggle::after {
    display: inline-block;
    margin-left: 6px;
    content: "▼";
    font-size: 10px;
    color: #6B7280;
    transition: transform 0.3s ease, color 0.3s ease;
}
.navbar-nav .dropdown-toggle.show::after {
    transform: rotate(-180deg);
    color: #3B82F6;
}

/* Dropdown items */
.dropdown-menu {
    background: #1A1A1A;
    border-radius: 12px;
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease forwards;
}
.dropdown-item {
    color: #D1D5DB;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    transition: all 0.2s ease;
}
.dropdown-item i {
    color: #9CA3AF; /* gray icon */
    font-size: 16px;
    transition: all 0.3s ease;
}
.dropdown-item:hover i {
    color: #3B82F6; /* icon blue on hover */
}
.dropdown-item:hover {
    background: #2C2C2C;
    color: #fff;
}

/* Divider */
.dropdown-divider {
    border-color: #333;
}

/* Dropdown fade-in keyframes */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}
.post-actions .post-btn {
    background: #2C2C2C;
    border: none;
    color: #F8FAFC;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.post-actions .post-btn i {
    color: #6B7280; /* Gray icon */
    transition: color 0.3s ease;
}

.post-actions .post-btn:hover {
    background: #3B82F6; /* Button hover */
    color: #fff;
    transform: translateY(-1px);
}

.post-actions .post-btn:hover i {
    color: #fff; /* Icon turns white on hover */
}
/* ===== Guest Carousel Styling ===== */
#guestCarousel {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0,0,0,0.6);
    margin-bottom: 30px;
}

#guestCarousel .carousel-inner {
    border-radius: 16px;
}

#guestCarousel .carousel-item img {
    width: 100%;
    height: auto; /* auto height */
    max-height: 500px; /* optional, controls max height */
    object-fit: cover; /* still fills width */
}

#guestCarousel .carousel-item img:hover {
    transform: scale(1.03);
}

/* Carousel controls (arrows) */
#guestCarousel .carousel-control-prev-icon,
#guestCarousel .carousel-control-next-icon {
    filter: invert(1);
    width: 45px;
    height: 45px;
}

/* Carousel captions overlay (optional, elegant) */
#guestCarousel .carousel-caption {
    bottom: 20px;
    text-align: left;
    color: #fff;
    background: rgba(0,0,0,0.4);
    padding: 12px 20px;
    border-radius: 12px;
    max-width: 80%;
}

#guestCarousel .carousel-caption h5 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 5px;
}

#guestCarousel .carousel-caption p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.3;
}

/* Responsive adjustments */
@media (max-width: 991px) {

    /* Guest form mobile adjustments */
    .guest-form {
        position: relative !important; /* override fixed */
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 30px auto; /* spacing from top and bottom */
        width: 90%;
        max-width: 400px;
        padding: 30px 20px;
    }

    /* Show carousel on mobile */
    #guestCarousel {
        display: block !important;
        margin-top: 20px;
        max-height: 400px;
    }
    
    #guestCarousel .carousel-item img {
        height: 300px !important;
        object-fit: cover;
    }

    /* Navbar collapse adjustments */
    .navbar-collapse {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-top: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        background-color: #1A1A1A;
    }
    .navbar-collapse.show {
        max-height: 500px;
    }
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        align-items: flex-start;
    }
}

.avatar-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #2C2C2C;
}
.comment input {
    flex: 1;
}

.alert {
    padding: 12px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}
.success {
    background: #d4edda;
    color: #155724;
}
.error {
    background: #f8d7da;
    color: #721c24;
}
