/* Facebook-like Design System */
:root {
    --primary-color: #f58b1f;
    --primary-hover: #e67e22;
    --bg-primary: #ffffff;
    --bg-secondary: #f0f2f5;
    --bg-hover: #f2f2f2;
    --text-primary: #050505;
    --text-secondary: #65676b;
    --border-color: #e4e6eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.34;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    height: 56px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.nav-menu {
    display: flex !important;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover {
    background-color: var(--bg-hover);
}

.nav-item.active {
    color: var(--primary-color);
    background-color: var(--bg-hover);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

.logout-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: var(--primary-hover);
}

/* Main Layout */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    padding-top: 76px;
}

.feed-container {
    min-height: calc(100vh - 56px);
}

.feed-layout {
    display: flex;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 300px;
    position: sticky;
    top: 76px;
    height: calc(100vh - 76px);
    overflow-y: auto;
    padding-right: 8px;
}

.sidebar-content {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.sidebar-section h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.subject-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subject-item {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}

.subject-item:hover {
    background-color: var(--bg-hover);
}

.subject-item.active {
    background-color: var(--bg-hover);
}

.subject-name {
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 2px;
}

.subject-code {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Feed Main */
.feed-main {
    flex: 1;
    max-width: 680px;
    min-width: 0;
}

/* Create Post */
.create-post {
    margin-bottom: 16px;
}

.post-box {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.post-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.post-input:hover {
    background-color: var(--bg-hover);
}

.post-input:focus {
    cursor: text;
}

.post-form {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    min-height: 100px;
}

.post-textarea:focus {
    border-color: var(--primary-color);
}

.subject-select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    background-color: var(--bg-primary);
    cursor: pointer;
}

.subject-select:focus {
    border-color: var(--primary-color);
}

.post-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-cancel {
    padding: 8px 16px;
    border: none;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.btn-cancel:hover {
    background-color: var(--bg-hover);
}

.btn-submit {
    padding: 8px 24px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.2s;
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Image Upload Button */
.image-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background-color 0.2s;
    font-family: inherit;
}

.image-upload-btn:hover {
    background-color: var(--bg-secondary);
}

.image-upload-btn i {
    font-size: 20px;
}

#remove-image-btn:hover {
    background: rgba(0,0,0,0.8) !important;
}

/* Post Card */
.post {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    position: relative;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
}

.user-name:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.subject-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.post-content {
    margin-bottom: 12px;
}

.post-content p {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 15px;
}

.post-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 12px;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-secondary);
}

.post-actions {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.action-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background-color: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn:hover {
    background-color: var(--bg-hover);
}

.action-btn.liked {
    color: var(--primary-color);
}

/* Comments */
.comments-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.comment {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    gap: 8px;
    flex: 1;
}

.comment-content {
    flex: 1;
    background-color: var(--bg-secondary);
    padding: 8px 12px;
    border-radius: 18px;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
    cursor: pointer;
}

.comment-author:hover {
    text-decoration: underline;
}

.comment-text {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.comment-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    font-weight: 600;
    transition: color 0.2s;
}

.comment-action:hover {
    text-decoration: underline;
}

.comment-action.liked {
    color: var(--primary-color);
}

.comment-time {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Create Comment */
.create-comment {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.comment-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    background-color: var(--bg-secondary);
    transition: border-color 0.2s;
}

.comment-input:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-primary);
}

/* Load More Comments Button */
.load-more-comments {
    text-align: center;
    margin-top: 12px;
    padding: 8px 0;
}

.btn-load-more {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    border-radius: 6px;
}

.btn-load-more:hover:not(:disabled) {
    background-color: var(--bg-hover);
    text-decoration: underline;
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Subjects Page */
.subjects-container {
    min-height: calc(100vh - 56px);
    padding: 0;
    padding-top: 76px;
    background: linear-gradient(to bottom, var(--bg-secondary) 0%, var(--bg-secondary) 300px, #ffffff 300px);
}

.subjects-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.subjects-header-wrapper {
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 50%, #d35400 100%);
    padding: 40px 16px;
    margin: 0 -16px 30px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 12px rgba(245, 139, 31, 0.3);
}

.subjects-header {
    text-align: center;
    color: white;
}

.subjects-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.subjects-header h1 i {
    font-size: 36px;
}

.subjects-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

.subjects-search-wrapper {
    margin-bottom: 30px;
}

.subjects-search {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.subjects-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
}

.subjects-search input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
    outline: none;
}

.subjects-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 139, 31, 0.1);
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.subject-card {
    background-color: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f58b1f 0%, #e67e22 50%, #f58b1f 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(245, 139, 31, 0.3);
}

.subject-card:hover::before {
    opacity: 1;
}

.subject-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.subject-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 139, 31, 0.3);
}

.subject-icon {
    color: white;
    font-size: 24px;
}

.subject-title-wrapper {
    flex: 1;
    min-width: 0;
}

.subject-title-wrapper h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.subject-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.subject-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.subject-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.stat-item i {
    color: var(--primary-color);
    width: 18px;
    text-align: center;
}

.stat-item span {
    flex: 1;
}

.subjects-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.subjects-empty i {
    color: var(--border-color);
    margin-bottom: 20px;
}

.subjects-empty h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.btn-enroll {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 139, 31, 0.3);
}

.btn-enroll:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 139, 31, 0.4);
}

.btn-enroll.enrolled {
    background: linear-gradient(135deg, #42b72a 0%, #36a420 100%);
    box-shadow: 0 4px 12px rgba(66, 183, 42, 0.3);
}

.btn-enroll.enrolled:hover {
    box-shadow: 0 6px 16px rgba(66, 183, 42, 0.4);
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive for Subjects Page - Mobile */
@media (max-width: 767px) {
    .subjects-container {
        padding-top: 0px;
        background: linear-gradient(to bottom, var(--bg-secondary) 0%, var(--bg-secondary) 200px, #ffffff 200px);
    }
    
    .subjects-content {
        padding: 0 10px 16px;
    }
    
    .subjects-header-wrapper {
        padding: 16px 10px;
        margin: 0 -10px 12px;
        border-radius: 0 0 16px 16px;
    }
    
    .subjects-header h1 {
        font-size: 20px;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 8px;
    }
    
    .subjects-header h1 i {
        font-size: 24px;
    }
    
    .subjects-subtitle {
        font-size: 12px;
        padding: 0;
    }
    
    .subjects-search-wrapper {
        margin-bottom: 12px;
    }
    
    .subjects-search {
        max-width: 100%;
    }
    
    .subjects-search input {
        padding: 10px 12px 10px 40px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .subjects-search i {
        left: 12px;
        font-size: 15px;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .subject-card {
        padding: 12px;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    }
    
    .subject-card-header {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .subject-icon-wrapper {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }
    
    .subject-icon {
        font-size: 18px;
    }
    
    .subject-title-wrapper h3 {
        font-size: 16px;
        margin-bottom: 4px;
        line-height: 1.3;
    }
    
    .subject-badge {
        font-size: 10px;
        padding: 2px 8px;
        border-radius: 8px;
    }
    
    .subject-description {
        font-size: 12px;
        margin-bottom: 12px;
        min-height: auto;
        -webkit-line-clamp: 2;
        line-height: 1.5;
    }
    
    .subject-stats {
        gap: 6px;
        margin-bottom: 12px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .stat-item {
        font-size: 12px;
        gap: 6px;
    }
    
    .stat-item i {
        width: 14px;
        font-size: 12px;
    }
    
    .btn-enroll {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .subjects-empty {
        padding: 30px 12px;
    }
    
    .subjects-empty i {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .subjects-empty h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }
}

/* Small Mobile */
@media (max-width: 479px) {
    .subjects-header-wrapper {
        padding: 14px 8px;
        margin: 0 -10px 10px;
    }
    
    .subjects-header h1 {
        font-size: 18px;
        gap: 4px;
    }
    
    .subjects-header h1 i {
        font-size: 22px;
    }
    
    .subjects-subtitle {
        font-size: 11px;
    }
    
    .subjects-content {
        padding: 0 8px 12px;
    }
    
    .subjects-search-wrapper {
        margin-bottom: 10px;
    }
    
    .subjects-search input {
        padding: 9px 10px 9px 36px;
        font-size: 13px;
    }
    
    .subjects-search i {
        left: 10px;
        font-size: 14px;
    }
    
    .subjects-grid {
        gap: 8px;
    }
    
    .subject-card {
        padding: 10px;
        border-radius: 8px;
    }
    
    .subject-card-header {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .subject-icon-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 7px;
    }
    
    .subject-icon {
        font-size: 16px;
    }
    
    .subject-title-wrapper h3 {
        font-size: 15px;
        margin-bottom: 3px;
    }
    
    .subject-badge {
        font-size: 9px;
        padding: 2px 7px;
    }
    
    .subject-description {
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    .subject-stats {
        gap: 5px;
        margin-bottom: 10px;
        padding: 8px;
    }
    
    .stat-item {
        font-size: 11px;
        gap: 5px;
    }
    
    .stat-item i {
        width: 12px;
        font-size: 11px;
    }
    
    .btn-enroll {
        padding: 7px 12px;
        font-size: 12px;
    }
}

/* News Page */
.news-container {
    min-height: calc(100vh - 56px);
    padding: 0;
    padding-top: 76px;
    background: linear-gradient(to bottom, var(--bg-secondary) 0%, var(--bg-secondary) 300px, #ffffff 300px);
}

.news-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.news-header-wrapper {
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 50%, #d35400 100%);
    padding: 40px 16px;
    margin: 0 -16px 30px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 12px rgba(245, 139, 31, 0.3);
}

.news-header {
    text-align: center;
    color: white;
}

.news-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.news-header h1 i {
    font-size: 36px;
}

.news-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

.news-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.news-main {
    min-width: 0;
}

.news-search-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.news-search-form {
    display: flex;
    gap: 16px;
    align-items: stretch;
    flex-wrap: wrap;
}

.news-search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.news-search-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
}

.news-search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
    outline: none;
}

.news-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 139, 31, 0.1);
}

.news-filter-wrapper {
    min-width: 200px;
    position: relative;
}

.news-filter-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
    z-index: 1;
}

.news-filter-select {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2365676b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.news-filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 139, 31, 0.1);
}

.news-search-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 139, 31, 0.3);
    white-space: nowrap;
}

.news-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 139, 31, 0.4);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.news-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(245, 139, 31, 0.3);
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover .news-card-overlay {
    opacity: 1;
}

.news-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    width: fit-content;
}

.news-card-badge i {
    font-size: 10px;
}

.news-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.news-card:hover .news-card-title {
    color: var(--primary-color);
}

.news-card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
    visibility: visible;
    opacity: 1;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.news-card-meta i {
    font-size: 12px;
}

.news-card-read-more {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    transition: gap 0.3s ease;
}

.news-card:hover .news-card-read-more {
    gap: 10px;
}

.news-card-read-more i {
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-read-more i {
    transform: translateX(4px);
}

.news-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.news-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.news-empty i {
    color: var(--border-color);
    margin-bottom: 20px;
}

.news-empty h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.news-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.news-sidebar-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.news-sidebar-header {
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-sidebar-header i {
    font-size: 20px;
}

.news-sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.news-sidebar-list {
    display: flex;
    flex-direction: column;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
}

.news-sidebar-list::-webkit-scrollbar {
    width: 6px;
}

.news-sidebar-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.news-sidebar-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.news-sidebar-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.news-sidebar-item {
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.news-sidebar-item:last-child {
    border-bottom: none;
}

.news-sidebar-item:hover {
    background-color: var(--bg-hover);
    color: var(--primary-color);
    padding-left: 24px;
}

.news-sidebar-item.active {
    background: linear-gradient(90deg, rgba(245, 139, 31, 0.1) 0%, transparent 100%);
    color: var(--primary-color);
    font-weight: 600;
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
}

.news-sidebar-item i {
    width: 16px;
    text-align: center;
    font-size: 12px;
}

.news-sidebar-item span {
    flex: 1;
}

/* News Page Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .news-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .news-sidebar {
        position: static;
        order: 2;
    }
    
    .news-main {
        order: 1;
    }
}

/* News Page Mobile */
@media (max-width: 767px) {
    .news-container {
        padding-top: 0px;
        background: linear-gradient(to bottom, var(--bg-secondary) 0%, var(--bg-secondary) 200px, #ffffff 200px);
    }
    
    .news-content {
        padding: 0 10px 16px;
    }
    
    .news-header-wrapper {
        padding: 16px 10px;
        margin: 0 -10px 12px;
        border-radius: 0 0 16px 16px;
    }
    
    .news-header h1 {
        font-size: 20px;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 8px;
    }
    
    .news-header h1 i {
        font-size: 24px;
    }
    
    .news-subtitle {
        font-size: 12px;
        padding: 0;
    }
    
    .news-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .news-sidebar {
        position: static;
        order: 2;
    }
    
    .news-main {
        order: 1;
    }
    
    .news-search-card {
        padding: 12px;
        border-radius: 10px;
        margin-bottom: 12px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    }
    
    .news-search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .news-search-input-wrapper {
        min-width: 100%;
    }
    
    .news-search-input {
        padding: 10px 12px 10px 40px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .news-search-input-wrapper i {
        left: 12px;
        font-size: 15px;
    }
    
    .news-filter-wrapper {
        min-width: 100%;
    }
    
    .news-filter-select {
        padding: 10px 12px 10px 40px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .news-filter-wrapper i {
        left: 12px;
        font-size: 15px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .news-card {
        margin-bottom: 0;
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
        overflow: hidden;
    }
    
    .news-card-image {
        height: 160px;
    }
    
    .news-card-content {
        padding: 12px;
    }
    
    .news-card-badge {
        font-size: 10px;
        padding: 4px 8px;
        margin-bottom: 8px;
    }
    
    .news-card-title {
        font-size: 16px;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
        line-height: 1.3;
    }
    
    .news-card-excerpt {
        font-size: 12px;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
        line-height: 1.5;
    }
    
    .news-card-footer {
        padding-top: 10px;
        margin-top: auto;
    }
    
    .news-card-meta {
        font-size: 11px;
    }
    
    .news-card-read-more {
        font-size: 12px;
    }
    
    .news-empty {
        padding: 30px 12px;
        border-radius: 10px;
    }
    
    .news-empty i {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .news-empty h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .news-pagination {
        margin-top: 16px;
    }
}

/* Small Mobile */
@media (max-width: 479px) {
    .news-header-wrapper {
        padding: 20px 8px;
        margin: 0 -12px 16px;
    }
    
    .news-header h1 {
        font-size: 20px;
    }
    
    .news-header h1 i {
        font-size: 24px;
    }
    
    .news-subtitle {
        font-size: 12px;
    }
    
    .news-content {
        padding: 0 8px 20px;
    }
    
    .news-search-card {
        padding: 14px;
        margin-bottom: 16px;
    }
    
    .news-search-form {
        gap: 10px;
    }
    
    .news-search-input,
    .news-filter-select {
        padding: 10px 12px 10px 40px;
        font-size: 13px;
    }
    
    .news-search-input-wrapper i,
    .news-filter-wrapper i {
        left: 12px;
        font-size: 15px;
    }
    
    .news-grid {
        gap: 10px;
    }
    
    .news-card-image {
        height: 160px;
    }
    
    .news-card-content {
        padding: 14px;
    }
    
    .news-card-title {
        font-size: 16px;
    }
    
    .news-card-excerpt {
        font-size: 12px;
    }
    
    .news-card-footer {
        padding-top: 10px;
    }
    
    .news-card-meta,
    .news-card-read-more {
        font-size: 11px;
    }
}

/* Hashtag Styles */
.hashtag-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, rgba(245, 139, 31, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.hashtag-link:hover {
    background: linear-gradient(135deg, rgba(245, 139, 31, 0.2) 0%, rgba(230, 126, 34, 0.2) 100%);
    text-decoration: underline;
}

.post-text {
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
}

.hashtag-header {
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(245, 139, 31, 0.3);
}

.hashtag-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hashtag-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.hashtag-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.hashtag-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
}

.hashtags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hashtag-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.hashtag-badge:hover {
    background: linear-gradient(135deg, rgba(245, 139, 31, 0.1) 0%, rgba(230, 126, 34, 0.1) 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hashtag-count {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.hashtag-badge:hover .hashtag-count {
    background: var(--primary-color);
    color: white;
}

/* Hashtags Index Page */
.hashtags-header-wrapper {
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 50%, #d35400 100%);
    padding: 40px 16px;
    margin: 0 -16px 30px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 12px rgba(245, 139, 31, 0.3);
}

.hashtags-header {
    text-align: center;
    color: white;
    max-width: 1200px;
    margin: 0 auto;
}

.hashtags-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hashtags-header h1 i {
    font-size: 36px;
}

.hashtags-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

.hashtags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.hashtag-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hashtag-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.hashtag-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.hashtag-card-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.hashtag-card-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.hashtags-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.hashtags-empty i {
    color: var(--border-color);
    margin-bottom: 20px;
}

.hashtags-empty h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.hashtags-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.popular-hashtags {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.popular-hashtags h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.popular-hashtags h3 i {
    color: var(--primary-color);
}

/* Responsive for Hashtags - Mobile */
@media (max-width: 767px) {
    .hashtags-header h1 {
        font-size: 24px;
    }
    
    .hashtags-header h1 i {
        font-size: 28px;
    }
    
    .hashtags-grid {
        grid-template-columns: 1fr;
    }
    
    .hashtag-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hashtags-list {
        gap: 8px;
    }
}

/* Follow Button Styles */
.btn-follow {
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-follow.follow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 139, 31, 0.4);
}

.btn-follow.unfollow:hover {
    background: var(--bg-hover) !important;
}

/* News Page Mobile */
@media (max-width: 767px) {
    .news-header h1 {
        font-size: 24px;
    }
    
    .news-header h1 i {
        font-size: 28px;
    }
    
    .news-subtitle {
        font-size: 14px;
    }
    
    .news-search-form {
        flex-direction: column;
    }
    
    .news-search-input-wrapper,
    .news-filter-wrapper {
        width: 100%;
    }
    
    .news-search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    background-color: var(--bg-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.btn-cancel {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.btn-cancel:hover {
    background-color: var(--bg-hover);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    text-align: center;
    color: var(--primary-color);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-input {
    padding: 12px;
    font-size: 16px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    outline: none;
    width: 100%;
}

.form-input:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    color: #f02849;
    text-align: center;
    font-size: 14px;
}

.auth-link {
    text-align: center;
    margin-top: 10px;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    background-color: var(--bg-primary);
    transition: all 0.2s;
    display: block;
    line-height: 1.5;
}

.pagination .page-link:hover {
    background-color: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    z-index: 1;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* News Images */
.article-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
    object-fit: cover;
}

.card-img-top {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Images in content (CKEditor) */
.article-content img,
.post-content img,
.article-content figure img,
.post-content figure img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
    margin: 16px 0;
    border-radius: 8px;
    object-fit: contain;
}

/* Figure tag in content */
.article-content figure,
.post-content figure {
    max-width: 100% !important;
    width: auto !important;
    margin: 16px 0;
    display: block;
}

.article-content figure img,
.post-content figure img {
    margin: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

/* General image responsive rules - exclude icons and avatars */
img:not(.user-avatar img):not(.fas):not(.far):not(.fab):not(i img) {
    max-width: 100%;
    height: auto;
}

/* Ensure images don't break container */
.post-content img,
.article-content img,
.post-content figure,
.article-content figure,
.post-content figure img,
.article-content figure img,
.card img,
.post-image,
.article-image,
.card-img-top {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

/* Pagination Responsive - Mobile */
@media (max-width: 767px) {
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination .page-item {
        margin: 2px;
    }
    
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 14px;
    }
}

/* Mobile Navigation Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-hover);
}

.mobile-menu-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    visibility: hidden !important;
}

.mobile-menu-overlay.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-nav-menu,
#mobile-nav-menu {
    display: none !important;
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    right: 0 !important;
    background-color: var(--bg-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 16px !important;
    transform: translateY(-100%) !important;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease !important;
    z-index: 1001 !important;
    box-shadow: var(--shadow-md) !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 56px) !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.mobile-nav-menu.active,
#mobile-nav-menu.active {
    display: block !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-nav-menu .nav-item {
    display: block;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
}

.mobile-nav-menu .nav-item:hover,
.mobile-nav-menu .nav-item.active {
    background-color: var(--bg-hover);
    color: var(--primary-color);
}

/* ========================================
   MOBILE RESPONSIVE (max-width: 767px)
   ======================================== */
@media (max-width: 767px) {
    /* Header Mobile */
    .header {
        height: 56px;
    }
    
    .header-content {
        padding: 0 12px;
    }
    
    .logo {
        font-size: 18px;
        flex: 1;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu {
        display: none !important;
    }
    
    /* Mobile menu should be visible when active */
    #mobile-nav-menu:not(.active) {
        display: none !important;
        transform: translateY(-100%) !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    #mobile-nav-menu.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        z-index: 1001 !important;
    }
    
    .user-menu {
        gap: 8px;
    }
    
    /* Chỉ ẩn user-name trong header, không ẩn trong post */
    .user-menu .user-name {
        display: none !important;
    }
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .notification-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    /* Main Content */
    .main-content {
        padding: 12px;
        padding-top: 68px;
    }
    
    /* Feed Layout */
    .feed-layout {
        flex-direction: column;
        gap: 0;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        margin-bottom: 12px;
        order: 2;
    }
    
    .feed-main {
        width: 100%;
        order: 1;
    }
    
    /* Feed Container */
    .feed-container {
        padding: 0;
    }
    
    /* Post Cards */
    .post {
        margin-bottom: 12px;
        border-radius: 8px;
        padding: 12px;
    }
    
    .post-header {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .post-content {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .post-image,
    .article-image {
        max-height: 300px;
        border-radius: 8px;
        margin: 12px 0;
    }
    
    .post-actions {
        padding: 8px 0;
        border-top: 1px solid var(--border-color);
        margin-top: 12px;
    }
    
    .post-action {
        padding: 8px 12px;
        font-size: 14px;
        flex: 1;
    }
    
    /* Create Post */
    .create-post {
        margin-bottom: 12px;
    }
    
    .post-box {
        padding: 10px;
    }
    
    .post-input {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .post-textarea {
        min-height: 80px;
        font-size: 15px;
        padding: 10px;
    }
    
    /* Profile Page Mobile - Facebook Style */
    .profile-container {
        padding: 0;
        margin-top: 0px;
        background-color: var(--bg-secondary);
    }
    
    .profile-cover {
        height: 240px;
        margin-bottom: -70px;
        border-radius: 0;
        position: relative;
        overflow: hidden;
        z-index: 1;
    }
    
    .profile-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        pointer-events: none;
    }
    
    .cover-edit-btn {
        position: absolute;
        bottom: 12px;
        right: 12px;
        background: rgba(0, 0, 0, 0.65) !important;
        color: white !important;
        border: none !important;
        padding: 8px 14px !important;
        border-radius: 8px !important;
        cursor: pointer;
        font-weight: 600;
        font-size: 13px !important;
        display: flex;
        align-items: center;
        gap: 6px;
        backdrop-filter: blur(10px);
        z-index: 100;
        pointer-events: auto;
        touch-action: manipulation;
        min-width: 44px;
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .cover-edit-btn:active {
        background: rgba(0, 0, 0, 0.8) !important;
        transform: translateZ(0) scale(0.98);
    }
    
    .profile-avatar {
        width: 120px !important;
        height: 120px !important;
        font-size: 48px !important;
        border: 5px solid white !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
        margin: 0 auto;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        color: white;
        overflow: hidden;
        border-radius: 50% !important;
    }
    
    .profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }
    
    .avatar-edit-btn {
        position: absolute;
        bottom: 4px;
        right: 4px;
        background: #f58b1f !important;
        color: white !important;
        border: 3px solid white !important;
        border-radius: 50% !important;
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 14px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    }
    
    .profile-header {
        flex-direction: column !important;
        align-items: center !important;
        gap: 16px !important;
        padding: 75px 16px 20px !important;
        text-align: center;
        border-bottom: none !important;
    }
    
    .profile-header .profile-avatar-wrapper {
        width: 100%;
        display: flex;
        justify-content: center;
        position: relative;
    }
    
    .profile-header h1 {
        font-size: 24px !important;
        font-weight: 700;
        margin: 0;
        line-height: 1.3;
        color: var(--text-primary);
    }
    
    .profile-header .profile-name-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    
    .profile-header .profile-name-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
        margin-bottom: 4px;
    }
    
    .level-badge {
        background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%) !important;
        color: white !important;
        padding: 6px 14px !important;
        border-radius: 16px !important;
        font-size: 13px !important;
        font-weight: 700;
        box-shadow: 0 2px 6px rgba(245, 139, 31, 0.3);
        letter-spacing: 0.3px;
    }
    
    .coins-badge {
        background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%) !important;
        color: #1c1e21 !important;
        padding: 6px 14px !important;
        border-radius: 16px !important;
        font-size: 13px !important;
        font-weight: 700;
        box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
        letter-spacing: 0.3px;
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }
    
    .coins-badge i {
        font-size: 12px;
    }
    
    .profile-edit-btn {
        background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%) !important;
        border: none !important;
        color: white !important;
        padding: 8px 16px !important;
        border-radius: 10px !important;
        cursor: pointer;
        font-size: 14px !important;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.2s ease;
        box-shadow: 0 2px 6px rgba(245, 139, 31, 0.25);
    }
    
    .profile-edit-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(245, 139, 31, 0.4);
        background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important;
    }
    
    .profile-edit-btn:active {
        transform: translateY(0);
    }
    
    .profile-xp-section {
        width: 100%;
        padding: 16px;
        background: linear-gradient(135deg, rgba(245, 139, 31, 0.05) 0%, rgba(230, 126, 34, 0.05) 100%);
        border-radius: 14px;
        margin-bottom: 12px;
        border: 1px solid rgba(245, 139, 31, 0.2);
    }
    
    .profile-xp-text {
        font-size: 14px;
        color: var(--text-primary);
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .profile-xp-text strong {
        color: #f58b1f;
        font-weight: 700;
        font-size: 15px;
    }
    
    .profile-xp-text span:last-child {
        font-size: 13px;
        color: var(--text-secondary);
        font-weight: 500;
    }
    
    .profile-xp-progress {
        width: 100%;
        height: 8px;
        background: rgba(245, 139, 31, 0.15);
        border-radius: 4px;
        overflow: hidden;
        margin-top: 10px;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .profile-xp-progress-bar {
        height: 100%;
        background: linear-gradient(90deg, #f58b1f 0%, #e67e22 50%, #f58b1f 100%);
        background-size: 200% 100%;
        transition: width 0.5s ease;
        border-radius: 4px;
        animation: shimmer 2s infinite;
        box-shadow: 0 1px 3px rgba(245, 139, 31, 0.4);
    }
    
    @keyframes shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
    
    .profile-stats-mobile {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
        margin-bottom: 16px;
    }
    
    .profile-stat-item {
        background: var(--bg-primary);
        padding: 12px;
        border-radius: 10px;
        text-align: center;
        border: 1px solid var(--border-color);
        text-decoration: none;
        color: inherit;
        transition: background-color 0.2s;
    }
    
    .profile-stat-item:hover {
        background: var(--bg-hover);
    }
    
    .profile-stat-item strong {
        display: block;
        font-size: 20px;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 4px;
    }
    
    .profile-stat-item span {
        font-size: 12px;
        color: var(--text-secondary);
    }
    
    .profile-actions-mobile {
        width: 100%;
        display: flex;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .btn-follow {
        flex: 1;
        padding: 12px 20px !important;
        font-size: 15px !important;
        font-weight: 600;
        border-radius: 8px !important;
        border: none;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .btn-follow.follow {
        background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%) !important;
        color: white !important;
        box-shadow: 0 2px 8px rgba(245, 139, 31, 0.3);
    }
    
    .btn-follow.unfollow {
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-color) !important;
        color: var(--text-primary) !important;
    }
    
    .profile-posts-section {
        width: 100%;
        padding: 16px;
        background: var(--bg-primary);
        border-radius: 12px;
        margin-top: 0;
    }
    
    .profile-posts-section h2 {
        font-size: 20px;
        font-weight: 700;
        margin: 0 0 16px 0;
        color: var(--text-primary);
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .feed-layout {
        padding: 0;
    }
    
    .feed-main.profile-main {
        max-width: 100%;
        padding: 0;
    }
    
    .profile-main .post {
        border-radius: 12px;
        margin-bottom: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
    
    .profile-main .post:first-of-type {
        margin-top: 0;
    }
    
    /* Profile Container Spacing */
    .profile-container .feed-layout {
        padding: 0;
        max-width: 100%;
    }
    
    .profile-container .feed-main.profile-main {
        padding: 0 12px;
    }
    
    /* Buttons */
    .btn-submit,
    .btn-follow {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        max-width: 300px;
    }
    
    /* Profile Stats Spacing */
    .profile-stats-mobile {
        margin-bottom: 16px;
    }
    
    /* Profile XP Section Mobile */
    .profile-xp-section {
        margin-bottom: 16px;
    }
    
    /* Stats */
    .profile-stats,
    [style*="display: flex"][style*="gap: 24px"] {
        flex-wrap: wrap;
        gap: 12px !important;
        font-size: 13px !important;
        margin-bottom: 16px;
    }
    
    .profile-stats > div,
    [style*="display: flex"][style*="gap: 24px"] > div {
        font-size: 13px !important;
    }
    
    /* Comments */
    .comment {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .comment-content {
        font-size: 14px;
    }
    
    /* Notifications */
    .notifications-panel {
        position: fixed;
        top: 64px;
        right: 10px;
        left: auto;
        width: calc(100vw - 20px);
        max-width: 360px;
        transform: none;
    }
    
    /* Pagination */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
        margin: 2px;
    }
}

/* ========================================
   TABLET RESPONSIVE (768px - 1023px)
   ======================================== */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Header Tablet */
    .header-content {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
        gap: 6px;
    }
    
    .nav-item {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .user-menu {
        gap: 10px;
    }
    
    .mobile-nav-menu {
        display: none !important;
    }
    
    /* Main Content Tablet */
    .main-content {
        padding: 20px;
        padding-top: 76px;
    }
    
    /* Feed Layout Tablet */
    .feed-layout {
        gap: 16px;
        padding: 0 12px;
    }
    
    .feed-main {
        max-width: 100%;
        flex: 1;
    }
    
    .sidebar {
        width: 260px;
        position: sticky;
        top: 76px;
        height: calc(100vh - 76px);
    }
    
    /* Post Cards Tablet */
    .post {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .post-header {
        gap: 12px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .post-content {
        font-size: 15px;
    }
    
    .post-image,
    .article-image {
        max-height: 400px;
    }
    
    /* Profile Page Tablet */
    .profile-container {
        margin-top: 56px;
        background-color: var(--bg-secondary);
    }
    
    .profile-container .feed-layout {
        padding: 0 12px;
        max-width: 100%;
    }
    
    .profile-cover {
        height: 280px;
        margin-bottom: -70px;
        border-radius: 0;
    }
    
    .profile-avatar {
        width: 140px;
        height: 140px;
        font-size: 56px;
        border: 4px solid white;
        margin: 0;
    }
    
    .profile-header {
        padding: 90px 20px 20px !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        text-align: left !important;
        gap: 16px !important;
        border-bottom: 1px solid var(--border-color);
    }
    
    .profile-header .profile-avatar-wrapper {
        justify-content: flex-start;
    }
    
    .profile-header .profile-name-section {
        align-items: flex-start;
        text-align: left;
        flex: 1;
    }
    
    .profile-header .profile-name-row {
        justify-content: flex-start;
    }
    
    .profile-header h1 {
        font-size: 28px;
    }
    
    .profile-stats-mobile {
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .profile-stat-item {
        background: transparent;
        padding: 0;
        border: none;
        text-align: left;
    }
    
    .profile-stat-item strong {
        display: inline;
        margin-right: 4px;
    }
    
    .cover-edit-text,
    .edit-text {
        display: inline;
    }
    
    /* Create Post Tablet */
    .post-box {
        padding: 14px;
    }
    
    .post-textarea {
        min-height: 100px;
    }
    
    /* Buttons Tablet */
    .btn-submit,
    .btn-follow {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    /* Notifications Tablet */
    .notifications-panel {
        width: 400px;
        max-width: calc(100vw - 40px);
    }
}

/* ========================================
   DESKTOP/PC RESPONSIVE (1024px and above)
   ======================================== */
@media (min-width: 1024px) {
    /* Header Desktop */
    .header-content {
        padding: 0 24px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
        gap: 8px;
    }
    
    .nav-item {
        padding: 8px 16px;
        font-size: 15px;
    }
    
    .mobile-nav-menu {
        display: none !important;
    }
    
    /* Main Content Desktop */
    .main-content {
        padding: 24px 16px;
        padding-top: 76px;
    }
    
    /* Feed Layout Desktop */
    .feed-layout {
        gap: 20px;
        padding: 0;
    }
    
    .feed-main {
        max-width: 680px;
    }
    
    .sidebar {
        width: 300px;
    }
    
    /* Post Cards Desktop */
    .post {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .post-image,
    .article-image {
        max-height: 500px;
    }
    
    /* Profile Page Desktop */
    .profile-container {
        margin-top: 56px;
        background-color: var(--bg-secondary);
        padding: 0;
    }
    
    .profile-container .feed-layout {
        padding: 0 16px;
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .profile-container .feed-main.profile-main {
        padding: 0;
    }
    
    .profile-cover {
        height: 350px !important;
        margin-bottom: -80px !important;
        border-radius: 8px 8px 0 0 !important;
        position: relative;
        overflow: hidden;
        z-index: 1;
    }
    
    .profile-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        pointer-events: none;
    }
    
    .cover-edit-btn {
        position: absolute !important;
        bottom: 16px !important;
        right: 16px !important;
        background: rgba(0, 0, 0, 0.65) !important;
        color: white !important;
        border: none !important;
        padding: 8px 16px !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        z-index: 100 !important;
        pointer-events: auto !important;
        min-width: auto !important;
        min-height: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    .cover-edit-btn:hover {
        background: rgba(0, 0, 0, 0.75) !important;
    }
    
    .cover-edit-btn:active {
        background: rgba(0, 0, 0, 0.8) !important;
        transform: scale(0.98) !important;
    }
    
    .profile-avatar {
        width: 168px !important;
        height: 168px !important;
        font-size: 64px !important;
        border: 4px solid white !important;
        margin: 0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        color: white;
        overflow: hidden;
        border-radius: 50% !important;
        position: relative;
    }
    
    .profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }
    
    .avatar-edit-btn {
        position: absolute !important;
        bottom: 8px !important;
        right: 8px !important;
        background: #f58b1f !important;
        color: white !important;
        border: 3px solid white !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10;
        pointer-events: auto;
        cursor: pointer;
        min-width: auto !important;
        min-height: auto !important;
        transform: none !important;
        -webkit-transform: none !important;
        transition: background-color 0.2s, transform 0.2s;
    }
    
    .avatar-edit-btn:hover {
        background: #e67e22 !important;
        transform: scale(1.05) !important;
    }
    
    .profile-header {
        padding: 100px 24px 24px !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        text-align: left !important;
        gap: 20px !important;
        border-bottom: 1px solid var(--border-color) !important;
        display: flex !important;
        margin-bottom: 24px;
    }
    
    .profile-header .profile-avatar-wrapper {
        position: relative !important;
        justify-content: flex-start !important;
        width: auto !important;
    }
    
    .profile-header .profile-name-section {
        align-items: flex-start !important;
        text-align: left !important;
        flex: 1;
        width: auto !important;
    }
    
    .profile-header .profile-name-row {
        justify-content: flex-start !important;
        gap: 12px !important;
        margin-bottom: 4px !important;
        display: flex !important;
        align-items: center !important;

    }
    
    .profile-header h1 {
        font-size: 32px !important;
        margin: 0;
    }
    
    .level-badge {
        padding: 6px 14px !important;
        font-size: 14px !important;
        box-shadow: 0 2px 6px rgba(245, 139, 31, 0.3);
    }
    
    .profile-edit-btn {
        padding: 8px 16px !important;
        font-size: 14px !important;
        box-shadow: 0 2px 6px rgba(245, 139, 31, 0.25);
    }
    
    .profile-edit-btn:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 10px rgba(245, 139, 31, 0.4) !important;
    }
    
    .profile-edit-btn:active {
        transform: translateY(0) !important;
    }
    
    .profile-stats-mobile {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 24px !important;
        flex-wrap: wrap;
        margin-bottom: 16px;
        width: auto !important;
    }
    
    .profile-stat-item {
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
    }
    
    .profile-stat-item:hover {
        background: transparent !important;
    }
    
    .profile-stat-item strong {
        display: inline !important;
        margin-right: 4px;
        font-size: inherit;
    }
    
    .profile-stat-item span {
        display: inline;
    }
    
    .profile-xp-section {
        margin-bottom: 16px !important;
        width: auto !important;
        padding: 16px !important;
        background: linear-gradient(135deg, rgba(245, 139, 31, 0.05) 0%, rgba(230, 126, 34, 0.05) 100%) !important;
        border-radius: 14px !important;
        border: 1px solid rgba(245, 139, 31, 0.2) !important;
    }
    
    .profile-xp-text {
        font-size: 14px !important;
    }
    
    .profile-xp-text strong {
        color: #f58b1f !important;
        font-weight: 700 !important;
        font-size: 15px !important;
    }
    
    .profile-xp-text span:last-child {
        font-size: 13px !important;
        color: var(--text-secondary) !important;
        font-weight: 500 !important;
    }
    
    .profile-xp-progress {
        height: 8px !important;
        background: rgba(245, 139, 31, 0.15) !important;
        border-radius: 4px !important;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }
    
    .profile-xp-progress-bar {
        border-radius: 4px !important;
        box-shadow: 0 1px 3px rgba(245, 139, 31, 0.4) !important;
    }
    
    .profile-actions-mobile {
        margin-top: 16px !important;
        width: auto !important;
        display: flex !important;
    }
    
    .btn-follow {
        width: auto !important;
        flex: none !important;
        padding: 10px 24px !important;
        font-size: 15px !important;
    }
    
    .profile-posts-section {
        margin-top: 24px;
        padding: 20px !important;
        background: var(--bg-primary) !important;
        border-radius: 12px !important;
        width: 100% !important;
    }
    
    .profile-posts-section h2 {
        font-size: 20px !important;
        margin: 0 0 16px 0 !important;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .cover-edit-text,
    .edit-text {
        display: inline !important;
    }
    
    /* Large Desktop (1400px+) */
    @media (min-width: 1400px) {
        .header-content,
        .feed-layout,
        .main-content {
            max-width: 1400px;
        }
        
        .feed-main {
            max-width: 800px;
        }
        
        .sidebar {
            width: 320px;
        }
    }
}

/* ========================================
   SMALL MOBILE DEVICES (max-width: 479px)
   ======================================== */
@media (max-width: 479px) {
    .header {
        height: 52px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .main-content {
        padding: 8px;
        padding-top: 64px;
    }
    
    .post {
        padding: 10px;
    }
    
    .post-header {
        gap: 8px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .post-content {
        font-size: 14px;
    }
    
    .post-image,
    .article-image {
        max-height: 250px;
    }
    
    .post-actions {
        gap: 4px;
    }
    
    .post-action {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .post-action i {
        font-size: 14px;
    }
    
    .profile-cover {
        height: 200px;
        margin-bottom: -60px;
    }
    
    .profile-avatar {
        width: 100px !important;
        height: 100px !important;
        font-size: 40px !important;
        border-width: 4px !important;
    }
    
    .avatar-edit-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
        border-width: 2px !important;
    }
    
    .profile-header {
        padding: 65px 12px 16px !important;
    }
    
    .profile-header h1 {
        font-size: 22px !important;
    }
    
    .profile-stats-mobile {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .profile-stat-item {
        padding: 10px;
    }
    
    .profile-stat-item strong {
        font-size: 18px;
    }
    
    .profile-stat-item span {
        font-size: 11px;
    }
    
    .profile-xp-section {
        padding: 10px;
    }
    
    .btn-follow {
        padding: 11px 16px !important;
        font-size: 14px !important;
    }
    
    .cover-edit-btn {
        padding: 7px 12px !important;
        font-size: 12px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        z-index: 100 !important;
        pointer-events: auto !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
    }
    
    .cover-edit-text,
    .edit-text {
        display: none;
    }
    
    .profile-posts-section {
        /* margin: 16px; */
    }
    
    .profile-posts-section h2 {
        font-size: 18px;
        padding-bottom: 10px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: #bcc0c4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8a8d91;
}

/* Image Viewer Modal (Facebook-like) */
.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.image-viewer-overlay.active {
    display: flex;
    opacity: 1;
}

.image-viewer-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.image-viewer-img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: imageViewerFadeIn 0.2s ease;
}

@keyframes imageViewerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-viewer-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 10000;
}

.image-viewer-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 10000;
}

.image-viewer-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.image-viewer-nav.prev {
    left: -60px;
}

.image-viewer-nav.next {
    right: -60px;
}

.image-viewer-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 16px;
    z-index: 10000;
}

.image-viewer-img {
    cursor: zoom-in;
}

.image-viewer-img.zoomed {
    cursor: zoom-out;
    transform: scale(2);
    transition: transform 0.3s ease;
}

.post-image {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.post-image:hover {
    opacity: 0.9;
}

/* Image Viewer Mobile */
@media (max-width: 767px) {
    .image-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .image-viewer-nav.prev {
        left: 10px;
    }
    
    .image-viewer-nav.next {
        right: 10px;
    }
    
    .image-viewer-close {
        top: 10px;
        right: 10px;
    }
    
    .image-viewer-counter {
        bottom: 10px;
    }
}

/* ========================================
   SIC BO MINIGAME POPUP STYLES
   ======================================== */

/* Sic Bo Popup Container */
.sicbo-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.sicbo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.sicbo-container {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 3px solid #f58b1f;
    border-radius: 20px;
    padding: 20px;
    max-width: 650px;
    width: 95%;
    height: 95vh;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 0 50px rgba(245, 139, 31, 0.6),
        0 0 100px rgba(245, 139, 31, 0.4),
        inset 0 0 30px rgba(245, 139, 31, 0.15);
    animation: slideUp 0.4s ease-out, sicboGlow 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes sicboGlow {
    0%, 100% {
        box-shadow: 
            0 0 50px rgba(245, 139, 31, 0.6),
            0 0 100px rgba(245, 139, 31, 0.4),
            inset 0 0 30px rgba(245, 139, 31, 0.15);
    }
    50% {
        box-shadow: 
            0 0 70px rgba(245, 139, 31, 0.8),
            0 0 140px rgba(245, 139, 31, 0.6),
            inset 0 0 40px rgba(245, 139, 31, 0.25);
    }
}

.sicbo-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(245, 139, 31, 0.6);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f58b1f;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.sicbo-close:hover {
    background: rgba(245, 139, 31, 0.2);
    border-color: #f58b1f;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(245, 139, 31, 0.6);
}

/* Header */
.sicbo-header {
    text-align: center;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.sicbo-icon {
    font-size: 45px;
    color: #f58b1f;
    margin-bottom: 8px;
    animation: diceBounce 2s ease-in-out infinite;
    text-shadow: 
        0 0 25px rgba(245, 139, 31, 0.9),
        0 0 50px rgba(245, 139, 31, 0.7),
        0 0 75px rgba(245, 139, 31, 0.5);
}

@keyframes diceBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-5deg); }
    75% { transform: translateY(-8px) rotate(5deg); }
}

.sicbo-title {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #f58b1f 0%, #ffd700 50%, #f58b1f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 4px 0;
    text-shadow: 0 0 25px rgba(245, 139, 31, 0.6);
    animation: titleShimmer 3s ease-in-out infinite;
}

@keyframes titleShimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.4); }
}

.sicbo-subtitle {
    color: #c0c0c0;
    font-size: 13px;
    margin: 0;
    font-weight: 400;
}

/* Coins Display */
.sicbo-coins-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 179, 0, 0.15) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.coins-label {
    color: #ffd700;
    font-size: 13px;
    font-weight: 600;
}

.coins-amount {
    font-size: 20px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.coins-icon {
    font-size: 18px;
    color: #ffd700;
    animation: coinSpin 2s ease-in-out infinite;
}

@keyframes coinSpin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

/* Bet Section */
.sicbo-bet-section {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.bet-label {
    display: block;
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.bet-label span {
    color: #f58b1f;
}

.bet-input-wrapper {
    position: relative;
}

.bet-input {
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(245, 139, 31, 0.4);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bet-input:focus {
    outline: none;
    border-color: #f58b1f;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(245, 139, 31, 0.4);
}

.bet-quick-buttons {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bet-quick-btn {
    flex: 1;
    min-width: 50px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(245, 139, 31, 0.2) 0%, rgba(230, 126, 34, 0.2) 100%);
    border: 2px solid rgba(245, 139, 31, 0.5);
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bet-quick-btn:hover {
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    border-color: #f58b1f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 139, 31, 0.5);
}

.bet-quick-btn:active {
    transform: translateY(0);
}

/* Choice Buttons */
.sicbo-choice-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.choice-btn {
    padding: 15px 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 3px solid rgba(245, 139, 31, 0.4);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.choice-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 139, 31, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.choice-btn:hover {
    border-color: #f58b1f;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 139, 31, 0.5);
}

.choice-btn:hover::before {
    opacity: 1;
}

.choice-btn.selected {
    background: linear-gradient(135deg, rgba(245, 139, 31, 0.3) 0%, rgba(230, 126, 34, 0.3) 100%);
    border-color: #f58b1f;
    box-shadow: 
        0 0 30px rgba(245, 139, 31, 0.8),
        inset 0 0 20px rgba(245, 139, 31, 0.2);
    animation: choicePulse 1.5s ease-in-out infinite;
}

@keyframes choicePulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(245, 139, 31, 0.8),
            inset 0 0 20px rgba(245, 139, 31, 0.2);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(245, 139, 31, 1),
            inset 0 0 30px rgba(245, 139, 31, 0.3);
    }
}

.choice-icon {
    font-size: 32px;
    margin-bottom: 4px;
    animation: diceShake 1s ease-in-out infinite;
}

@keyframes diceShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.choice-btn.selected .choice-icon {
    animation: diceShake 0.5s ease-in-out infinite;
}

.choice-label {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 3px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.choice-range {
    font-size: 11px;
    color: #c0c0c0;
    font-weight: 500;
}

/* Dice Section */
.sicbo-dice-section {
    margin-bottom: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

.dice-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.dice {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    border: 2px solid #f58b1f;
    border-radius: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 6px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    position: relative;
}

.dice.rolling {
    animation: diceRoll 0.15s linear infinite;
}

@keyframes diceRoll {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(90deg) rotateY(90deg); }
    50% { transform: rotateX(180deg) rotateY(180deg); }
    75% { transform: rotateX(270deg) rotateY(270deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.dice.result {
    animation: diceResult 0.5s ease-out;
}

@keyframes diceResult {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.dice-face {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    position: relative;
}

.dice-dot {
    width: 8px;
    height: 8px;
    background: #1a1a2e;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
    margin: auto;
}

.dice-sum {
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: sumPulse 1s ease-in-out infinite;
}

@keyframes sumPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.dice-sum span {
    font-size: 24px;
    color: #f58b1f;
}

/* Result Display */
.sicbo-result {
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-align: center;
    flex-shrink: 0;
}

.result-message {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    padding: 10px;
    border-radius: 10px;
    animation: resultSlide 0.5s ease-out;
}

@keyframes resultSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.result-message.win {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(56, 142, 60, 0.3) 100%);
    border: 2px solid #4caf50;
    color: #4caf50;
    text-shadow: 0 0 15px rgba(76, 175, 80, 0.8);
}

.result-message.lose {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3) 0%, rgba(211, 47, 47, 0.3) 100%);
    border: 2px solid #f44336;
    color: #f44336;
    text-shadow: 0 0 15px rgba(244, 67, 54, 0.8);
}

.result-details {
    font-size: 13px;
    color: #e0e0e0;
    line-height: 1.5;
}

.result-details strong {
    color: #fff;
    font-weight: 700;
}

.win-amount {
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.8);
}

.lose-amount {
    color: #f44336;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.8);
}

/* Buttons */
.sicbo-confirm-btn,
.sicbo-reset-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    border: 3px solid #f58b1f;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 139, 31, 0.5);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.sicbo-confirm-btn:hover:not(:disabled),
.sicbo-reset-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(245, 139, 31, 0.7);
}

.sicbo-confirm-btn:active:not(:disabled),
.sicbo-reset-btn:active {
    transform: translateY(-1px);
}

.sicbo-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.sicbo-confirm-btn.ready {
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(245, 139, 31, 0.5);
    }
    50% {
        box-shadow: 0 5px 30px rgba(245, 139, 31, 0.8);
    }
}

.btn-icon {
    font-size: 18px;
}

/* Coin Particles */
.coin-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

.coin-particle {
    position: absolute;
    font-size: 24px;
    animation: coinBurst 2s ease-out forwards;
}

@keyframes coinBurst {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--end-x, 0), var(--end-y, 0)) scale(0.5) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 767px) {
    .sicbo-container {
        padding: 15px;
        width: 98%;
        height: 98vh;
        max-height: 98vh;
    }
    
    .sicbo-header {
        margin-bottom: 8px;
    }
    
    .sicbo-icon {
        font-size: 35px;
        margin-bottom: 4px;
    }
    
    .sicbo-title {
        font-size: 20px;
    }
    
    .sicbo-subtitle {
        font-size: 11px;
    }
    
    .sicbo-coins-display {
        padding: 8px 14px;
        margin-bottom: 8px;
    }
    
    .coins-label {
        font-size: 11px;
    }
    
    .coins-amount {
        font-size: 16px;
    }
    
    .coins-icon {
        font-size: 14px;
    }
    
    .sicbo-bet-section {
        margin-bottom: 8px;
    }
    
    .bet-label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .bet-input {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .bet-quick-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 45px;
    }
    
    .sicbo-choice-section {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .choice-btn {
        padding: 10px 8px;
    }
    
    .choice-icon {
        font-size: 24px;
        margin-bottom: 2px;
    }
    
    .choice-label {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .choice-range {
        font-size: 9px;
    }
    
    .sicbo-dice-section {
        margin-bottom: 8px;
    }
    
    .dice {
        width: 50px;
        height: 50px;
        padding: 4px;
    }
    
    .dice-dot {
        width: 6px;
        height: 6px;
    }
    
    .dice-container {
        gap: 8px;
        margin-bottom: 6px;
    }
    
    .dice-sum {
        font-size: 14px;
    }
    
    .dice-sum span {
        font-size: 18px;
    }
    
    .sicbo-result {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .result-message {
        font-size: 14px;
        padding: 8px;
        margin-bottom: 4px;
    }
    
    .result-details {
        font-size: 11px;
    }
    
    .sicbo-confirm-btn,
    .sicbo-reset-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-icon {
        font-size: 16px;
    }
}

/* ========================================
   MINIGAME FLOATING BUTTON
   ======================================== */

.minigame-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 
        0 8px 25px rgba(245, 139, 31, 0.5),
        0 0 40px rgba(245, 139, 31, 0.3);
    transition: all 0.3s ease;
    animation: floatingBounce 3s ease-in-out infinite;
    overflow: visible;
}

.minigame-floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 
        0 12px 35px rgba(245, 139, 31, 0.7),
        0 0 60px rgba(245, 139, 31, 0.5);
}

.minigame-floating-btn:active {
    transform: scale(0.95);
}

@keyframes floatingBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.minigame-btn-icon {
    font-size: 32px;
    color: #fff;
    z-index: 2;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.minigame-btn-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.minigame-btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 139, 31, 0.6) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
    z-index: 0;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.minigame-btn-tooltip {
    position: absolute;
    right: 85px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.minigame-btn-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.9);
}

.minigame-floating-btn:hover .minigame-btn-tooltip {
    opacity: 1;
}

/* Responsive Floating Button */
@media (max-width: 767px) {
    .minigame-floating-btn {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .minigame-btn-icon {
        font-size: 28px;
    }
    
    .minigame-btn-pulse {
        width: 60px;
        height: 60px;
    }
    
    .minigame-btn-tooltip {
        right: 75px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ========================================
   MINIGAMES INDEX PAGE
   ======================================== */

.minigames-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 40px;
    min-height: calc(100vh - 56px);
}

.minigames-header {
    text-align: center;
    margin-bottom: 50px;
}

.minigames-icon {
    font-size: 80px;
    color: #f58b1f;
    margin-bottom: 20px;
    animation: gamepadBounce 2s ease-in-out infinite;
    text-shadow: 
        0 0 30px rgba(245, 139, 31, 0.8),
        0 0 60px rgba(245, 139, 31, 0.6);
}

@keyframes gamepadBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.minigames-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #f58b1f 0%, #ffd700 50%, #f58b1f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 15px 0;
    text-shadow: 0 0 30px rgba(245, 139, 31, 0.5);
    animation: titleShimmer 3s ease-in-out infinite;
}

.minigames-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin: 0 0 20px 0;
    font-weight: 500;
}

.user-coins-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 179, 0, 0.15) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-top: 15px;
}

.user-coins-display i {
    font-size: 20px;
    animation: coinSpin 2s ease-in-out infinite;
}

.user-coins-display strong {
    font-size: 20px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.minigames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.minigame-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 250, 0.95) 100%);
    border: 3px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.minigame-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--game-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.minigame-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--game-color);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.15),
        0 0 50px rgba(245, 139, 31, 0.3);
}

.minigame-card:hover::before {
    opacity: 0.05;
}

.minigame-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.minigame-icon-large {
    font-size: 64px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: gameIconFloat 3s ease-in-out infinite;
}

@keyframes gameIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.minigame-card:hover .minigame-icon-large {
    animation: gameIconFloat 1s ease-in-out infinite;
}

.minigame-status {
    position: relative;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.available {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.status-badge.coming-soon {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.4);
}

.minigame-card-body {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.minigame-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    transition: color 0.3s ease;
}

.minigame-card:hover .minigame-name {
    color: var(--game-color);
}

.minigame-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.minigame-card-footer {
    position: relative;
    z-index: 1;
}

.play-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--game-gradient);
    border: 2px solid var(--game-color);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 139, 31, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.play-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 139, 31, 0.5);
}

.play-btn:active:not(:disabled) {
    transform: translateY(0);
}

.play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.play-btn i {
    transition: transform 0.3s ease;
}

.minigame-card:hover .play-btn i {
    transform: translateX(5px);
}

.minigame-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--game-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.minigame-card:hover .minigame-glow {
    opacity: 0.1;
    animation: glowPulse 2s ease-in-out infinite;
}

/* Responsive Minigames Page */
@media (max-width: 767px) {
    .minigames-container {
        padding: 90px 15px 30px;
    }
    
    .minigames-icon {
        font-size: 60px;
    }
    
    .minigames-title {
        font-size: 36px;
    }
    
    .minigames-subtitle {
        font-size: 16px;
    }
    
    .minigames-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .minigame-card {
        padding: 25px 20px;
    }
    
    .minigame-icon-large {
        font-size: 52px;
    }
    
    .minigame-name {
        font-size: 22px;
    }
    
    .minigame-description {
        font-size: 14px;
    }
    
    .play-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

