:root {
    /* Colors */
    --primary-color: #27ae60;
    --primary-dark: #219a52;
    --primary-light: #a8e6cf;
    --secondary-color: #ff6b6b;
    --accent-color: #ffd166;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;

    /* Background & Text */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #636e72;
    --text-muted: #bdc3c7;

    /* Borders & Shadows */
    --border-color: #e0e0e0;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-full: 50%;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 15px 50px rgba(0,0,0,0.15);

    /* Transitions */
    --transition: all 0.3s ease;
    --transition-normal: all 0.3s ease;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #27ae60, #219a52);

    /* Layout */
    --container-width: 1200px;
    --container-padding: 15px;
    --header-height: 78px;

    /* Font Sizes */
    --font-size-2xl: 1.5rem;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
}
/* Reset and Basic Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    overflow-x: hidden;
}

/* Prevent horizontal scroll for media */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.header-logo-wrap {
    justify-self: start;
}

.header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-self: center;
}

.nav-auth {
    justify-self: end;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    display: inline-block;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

/* ===== Nav Auth Buttons ===== */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-auth-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-auth-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-login {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
}

.btn-login:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.btn-register {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: #fff;
    border: none;
}

.btn-register:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39,174,96,0.4);
}

/* ===== Nav User (Logged In) ===== */
.nav-user {
    display: flex;
    align-items: center;
    position: relative;
}

.nav-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 20px;
    transition: background 0.3s ease;
    color: #fff;
}

.nav-user-trigger:hover {
    background: rgba(255,255,255,0.1);
}

.nav-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.nav-user-name {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-caret {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-user-trigger[aria-expanded="true"] .nav-user-caret {
    transform: rotate(180deg);
}

/* User dropdown */
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1e2d3d;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    min-width: 140px;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 1003;
}

.nav-user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
    color: rgba(255,255,255,0.8);
    border: none;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
}

.nav-dropdown-link:hover {
    background: rgba(78,205,196,0.15);
    color: #4ecdc4;
}

.nav-logout-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
    color: rgba(255,255,255,0.8);
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: left;
    box-sizing: border-box;
}

.nav-logout-btn:hover {
    background: rgba(231,76,60,0.2);
    color: #ff6b6b;
}

@media (max-width: 768px) {
    .nav-auth {
        margin-left: 0;
        gap: 6px;
    }
    .nav-auth-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .nav-user-name {
        font-size: 11px;
        max-width: 80px;
    }
    .nav-user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .nav-user-trigger {
        padding: 2px 4px;
        gap: 4px;
    }
    .nav-user-dropdown {
        right: -8px;
    }

    /* Mobile header layout: ☰ logo together left, nav/auth right */
    .header-content {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        box-sizing: border-box;
    }
    .header-logo-wrap {
        display: flex;
        align-items: center;
        justify-self: unset;
    }
    .header-logo-wrap .logo {
        margin-left: 4px !important;
    }
    .menu-toggle {
        margin-left: 0 !important;
        flex-shrink: 0;
    }
    .header-content > nav {
        margin-left: auto;
        flex-shrink: 0;
        justify-self: unset;
    }
    .nav-auth {
        flex-shrink: 0;
        justify-self: unset;
    }
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #3498db;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    .header{
        height: fit-content;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}
.btn:hover {
    background: #2980b9;
}
.star-empty:before {
  color: #ccc;
}
/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
}

/* Search Toggle Button (all screens) */
.mobile-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-search-toggle svg {
    display: block;
}

/* Search Container (hidden, replaced by toggle icon) */
.search-container {
    display: none !important;
    align-items: center;
    margin-left: 2rem;
    position: relative;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 40px 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    width: 280px;
}

.search-button {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: var(--primary-color);
}

/* Mobile Search Modal */
.mobile-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.mobile-search-modal.active {
    display: flex;
}

.mobile-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.mobile-search-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mobile-search-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.mobile-search-close:hover {
    color: var(--error-color);
}

.mobile-search-title {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.mobile-search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-search-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.mobile-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.mobile-search-input::placeholder {
    color: #999;
}

.mobile-search-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mobile-search-submit:hover {
    background: var(--primary-dark);
}

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
}


.text-line2{
  width: 100%!important;
  line-height: 1.4!important;
  display: -webkit-box!important;
  -webkit-line-clamp: 2!important;
  line-clamp: 2!important;
  -webkit-box-orient: vertical!important;
  overflow: hidden!important;
  text-overflow: ellipsis!important;
  word-break: break-all!important;
}

.text-line1{
  width: 100%!important;
  line-height: 1.4!important;
  display: -webkit-box!important;
  -webkit-line-clamp: 1!important;
  line-clamp: 1!important;
  -webkit-box-orient: vertical!important;
  overflow: hidden!important;
  text-overflow: ellipsis!important;
  word-break: break-all!important;
}


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}



.popular-games-section {
            padding: 40px 0 !important;
            margin: 30px 0 !important;
        }

        .popular-games-section .section-title {
            color: #2c3e50 !important;
            border-bottom-color: rgba(255, 255, 255, 0.3) !important;
        }

        .popular-games-section .section-title+p {
            color: #333333!important;
            margin-bottom: 30px !important;
        }

        .popular-games-list {
            display: flex !important;
            flex-direction: column !important;
            gap: 20px !important;
        }

        .popular-game-item {
            background: rgba(255, 255, 255, 0.15) !important;
            backdrop-filter: blur(10px) !important;
            border-radius: 12px !important;
            padding: 20px !important;
            display: flex !important;
            align-items: center !important;
            gap: 20px !important;
            transition: transform 0.3s, background 0.3s !important;
        }

        .popular-game-item:hover {
            transform: translateX(5px) !important;
            background: rgba(255, 255, 255, 0.25) !important;
        }

        .popular-game-item a:first-child img {
            border-radius: 8px !important;
            width: 240px !important;
            height: 180px !important;
            object-fit: cover !important;
        }

        .popular-game-item .play-btn {
            background: #f39c12 !important;
            color: #ffffff !important;
            padding: 10px 25px !important;
            border-radius: 25px !important;
            text-decoration: none !important;
            font-weight: bold !important;
            transition: background 0.3s !important;
        }

        .popular-game-item .play-btn:hover {
            background: #e67e22 !important;
        }

        /* Recommended Games Section - Responsive Styles */
        .recommended-games-section {
            padding: 40px 0 !important;
            margin: 30px 0 !important;
        }

        .recommended-games-section .section-title {
            border-bottom-color: #667eea !important;
        }

        .recommended-games-section .section-title+p {
            color: #666 !important;
            margin-bottom: 30px !important;
        }

        .recommended-games-grid {
            display: grid !important;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
            gap: 20px !important;
        }

        .recommended-game-card {
            background: #ffffff !important;
            border-radius: 10px !important;
            overflow: hidden !important;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
            transition: transform 0.3s, box-shadow 0.3s !important;
        }

        .recommended-game-card:hover {
            transform: translateY(-5px) !important;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
        }

        .recommended-game-card img {
            width: 100% !important;
            height: 160px !important;
            object-fit: cover !important;
        }

        .recommended-game-card .badge {
            position: absolute !important;
            top: 10px !important;
            right: 10px !important;
            padding: 4px 10px !important;
            border-radius: 4px !important;
            font-size: 0.8rem !important;
            font-weight: bold !important;
            color: #ffffff !important;
        }

        .badge-hot {
            background: #e74c3c !important;
        }

        .badge-new {
            background: #27ae60 !important;
        }

        /* Mobile Responsive Styles */
        @media (max-width: 768px) {

            .popular-games-section,
            .recommended-games-section {
                padding: 20px 0 !important;
                margin: 20px 0 !important;
            }

            .popular-game-item {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 15px !important;
                padding: 15px !important;
            }

            .popular-game-item a:first-child {
                width: 100% !important;
            }

            .popular-game-item a:first-child img {
                width: 100% !important;
                height: auto !important;
                min-height: 220px !important;
            }

            .popular-game-item .play-btn {
                width: 100% !important;
                text-align: center !important;
                padding: 12px 20px !important;
            }

            .recommended-games-grid {
                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
                gap: 15px !important;
            }

            .recommended-game-card img {
                height: 140px !important;
            }

            .recommended-game-card h3 {
                font-size: 1rem !important;
            }

            .recommended-game-card p {
                font-size: 0.85rem !important;
            }
        }

        @media (max-width: 480px) {

            .popular-games-section,
            .recommended-games-section {
                padding: 15px 0 !important;
                margin: 15px 0 !important;
            }

            .popular-game-item {
                padding: 12px !important;
                gap: 12px !important;
            }

            .popular-game-item h3 {
                font-size: 1.1rem !important;
            }

            .popular-game-item p {
                font-size: 0.85rem !important;
            }

            .recommended-games-grid {
                grid-template-columns: 1fr !important;
                gap: 12px !important;
            }

            .recommended-game-card img {
                height: 120px !important;
            }

            .recommended-game-card h3 {
                font-size: 0.95rem !important;
            }

            .recommended-game-card p {
                font-size: 0.8rem !important;
                display: -webkit-box !important;
                -webkit-line-clamp: 2 !important;
                -webkit-box-orient: vertical !important;
                overflow: hidden !important;
            }
        }

        @media (min-width: 769px) and (max-width: 1024px) {
            .recommended-games-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }
        }

        @media (min-width: 1025px) {
            .recommended-games-grid {
                grid-template-columns: repeat(4, 1fr) !important;
            }
        }

/* ===== Comments Section ===== */
.comments-section {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto 0;
    box-sizing: border-box;
    padding: 0 10px;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e9ecef;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3436;
    margin: 0;
}

.comments-count {
    color: #868e96;
    font-size: 0.9rem;
    font-weight: 500;
    background: #f1f3f5;
    padding: 2px 10px;
    border-radius: 12px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-item {
    padding: 16px 18px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-item:hover {
    border-color: #d1d8e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #5a4bd1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author {
    font-weight: 600;
    color: #2d3436;
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-left: auto;
}

.comment-star {
    margin-left: 6px;
    font-size: 14px;
    color: #f59f00;
    letter-spacing: 1px;
}

.comment-content {
    color: #495057;
    line-height: 1.65;
    font-size: 0.9rem;
}

.comments-empty {
    text-align: center;
    padding: 50px 20px;
    color: #868e96;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.comments-empty-icon {
    font-size: 44px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.comments-loading {
    text-align: center;
    padding: 30px;
    color: #868e96;
    font-size: 0.9rem;
}

.load-more-comments {
    margin-top: 16px;
    text-align: center;
}

.btn-load-more {
    display: inline-block;
    padding: 9px 24px;
    background: #fff;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-load-more:hover {
    background: #f8f9fa;
    border-color: #6c5ce7;
    color: #6c5ce7;
}

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

/* ===== Comment Form ===== */
.comment-form {
    margin-bottom: 20px;
    padding: 22px 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form:focus-within {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}

.comment-form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-form-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #5a4bd1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    overflow: hidden;
    flex-shrink: 0;
    line-height: 1;
}

.comment-form-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-form-author {
    font-weight: 600;
    color: #2d3436;
    font-size: 0.95rem;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.comment-form-subtitle {
    font-size: 0.75rem;
    color: #adb5bd;
    line-height: 1.3;
}

.comment-form-rating {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-form-rating-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-right: 6px;
    font-weight: 500;
}

.rating-star {
    font-size: 20px;
    cursor: pointer;
    color: #dfe6e9;
    transition: color 0.15s, transform 0.15s;
    user-select: none;
    line-height: 1;
    padding: 2px 1px;
}

.rating-star:hover {
    color: #f59f00;
    transform: scale(1.25);
}

.rating-star:hover ~ .rating-star {
    color: #dfe6e9;
    transform: scale(1);
}

.rating-star.active {
    color: #f59f00;
}

.comment-form-rating:hover .rating-star.active {
    color: #e67700;
}

.comment-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    color: #2d3436;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 14px;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.6;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.comment-form-textarea::placeholder {
    color: #adb5bd;
}

.comment-form-textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108,92,231,0.08);
}

.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.comment-form-footer .rating-summary {
    margin-right: auto;
    font-size: 0.8rem;
    color: #868e96;
}

.btn-comment-submit {
    padding: 10px 28px;
    background: linear-gradient(135deg, #6c5ce7, #5a4bd1);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}

.btn-comment-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108,92,231,0.35);
}

.btn-comment-submit:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(108,92,231,0.2);
}

.btn-comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== Comment Login Hint ===== */
.comment-login-hint {
    text-align: center;
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 0.85rem;
}

.comment-login-hint a {
    color: #6c5ce7;
    text-decoration: none;
    font-weight: 600;
}

.comment-login-hint a:hover {
    text-decoration: underline;
}

/* ===== Responsive Comments ===== */
@media (max-width: 768px) {
    .comments-section {
        padding: 0 5px;
        margin-top: 20px;
    }

    .comments-title {
        font-size: 1.3rem;
    }

    .comment-form {
        padding: 16px 14px;
    }

    .comment-form-header {
        margin-bottom: 12px;
    }

    .comment-form-avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 14px;
    }

    .comment-form-author {
        font-size: 0.85rem;
        max-width: 140px;
    }

    .rating-star {
        font-size: 18px;
    }

    .comment-form-textarea {
        min-height: 80px;
        padding: 10px 12px;
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .btn-comment-submit {
        padding: 9px 22px;
        font-size: 0.85rem;
    }

    .comment-item {
        padding: 14px;
    }
}