/* assets/css/style.css */
:root {
    --primary-gradient: linear-gradient(135deg, #3fb045 0%, #0b6610 100%);
    --card-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
}

body {
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Navbar */
.navbar {
    background: var(--primary-gradient) !important;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* Cards */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}

.hover-shadow:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px) scale(1.02);
}

.cursor-pointer {
    cursor: pointer;
}

/* Post Cards - Modern Instagram Style */
.post-card {
    background: white;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 0.3s;
}

.post-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.post-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content {
    padding: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.post-image {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
}

.post-actions {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    border-top: 1px solid #f0f0f0;
}

.action-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.action-btn.liked {
    color: #e74c3c;
    background: #ffe5e5;
}

.action-btn i {
    font-size: 1.3rem;
}

/* Create Post Box */
.create-post-box {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.create-post-box textarea {
    border: none;
    resize: none;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 16px;
    background: #f8f9fa;
}

.create-post-box textarea:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 0.5rem;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-stars label:hover,
.rating-stars input:checked ~ label {
    color: #ffc107;
    transform: scale(1.2);
}

/* Comments */
.comment-item {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.comment-item:hover {
    background: #f0f0f0;
}

/* Profile */
.profile-cover {
    position: relative;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-gradient);
    opacity: 0.9;
}

/* Sidebar */
.sidebar-card {
    background: #d7d7fc;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 100px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .post-card {
        border-radius: 16px;
    }
    
    .post-actions {
        flex-wrap: wrap;
    }
    
    .sidebar-card {
        position: relative;
        top: 0;
        margin-top: 2rem;
    }
}

/* Dropdown Fix */
.dropdown-menu {
    border-radius: 16px;
    padding: 0.5rem;
    min-width: 200px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

/* Image Preview */
#imagePreview img {
    max-width: 100%;
    border-radius: 16px;
    margin-top: 1rem;
    box-shadow: var(--card-shadow);
}

/* ============================================ */
/* MOBILE BOTTOM NAVIGATION                     */
/* ============================================ */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px; /* Beri ruang untuk bottom nav */
    }
    
    .fixed-bottom {
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    }
    
    .fixed-bottom .nav-link {
        transition: transform 0.2s;
    }
    
    .fixed-bottom .nav-link:active {
        transform: scale(0.9);
    }
    
    /* Offcanvas styling */
    .offcanvas {
        border-top-left-radius: 20px;
        border-bottom-left-radius: 20px;
    }
    
    .offcanvas-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .offcanvas-header .btn-close {
        filter: invert(1);
    }
    
    .offcanvas-title {
        color: white !important;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Mobile-friendly touch targets */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
    }
    
    .form-control {
        min-height: 44px;
    }
}
/* Hashtag Link Styling */
.hashtag-link {
    transition: all 0.2s;
    padding: 0 2px;
    border-radius: 4px;
}

.hashtag-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #764ba2 !important;
    text-decoration: underline !important;
}

/* ============================================ */
/* DARK MODE SYSTEM                             */
/* ============================================ */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --input-bg: #f8f9fa;
}

[data-theme="dark"] {
    --bg-primary: #18191a;
    --bg-secondary: #242526;
    --bg-tertiary: #3a3b3c;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --border-color: #3e4042;
    --card-bg: #242526;
    --input-bg: #3a3b3c;
}

body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

.card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.card-header {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.bg-light {
    background-color: var(--bg-tertiary) !important;
}

.text-dark {
    color: var(--text-primary) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.form-control, .form-select {
    background-color: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.form-control:focus, .form-select:focus {
    background-color: var(--input-bg);
    color: var(--text-primary);
}

.border {
    border-color: var(--border-color) !important;
}

.dropdown-menu {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
}

.modal-content {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.offcanvas {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.btn-light {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-light:hover {
    background-color: var(--border-color);
}

/* Dark Mode Toggle Button */
.theme-toggle {
    cursor: pointer;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: rotate(20deg);
}

/* Navbar bottom mobile dark mode */
[data-theme="dark"] .navbar-light {
    background-color: var(--card-bg) !important;
}

[data-theme="dark"] .navbar-light .nav-link {
    color: var(--text-primary) !important;
}