/* style.css - Minimalist Pro (Final + Confetti + Share) */

/* --- 1. Base Styles & Variables --- */
:root {
    --sidebar-width: 280px;
    --primary-color: #000;
    --accent-color: #ffc107;

    /* Light Mode */
    --bg-body: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-light: #f8f9fa;
    --text-main: #222222;
    --text-muted: #888888;
    --border-color: #eaeaea;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --hover-bg: #f1f3f5;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-body: #121212;
    --bg-sidebar: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-light: #2a2a2a;
    --text-main: #f0f0f0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-bg: #333333;
}

body {
    font-family: 'Kanit', sans-serif !important;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none !important;
    transition: 0.2s;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-content {
    text-align: center;
}

.loader-icon {
    font-size: 3rem;
    color: #ffc107;
    animation: bounce 1s infinite;
}

.loader-text {
    font-weight: 800;
    margin-top: 10px;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* --- 2. Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 40px 30px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    left: 0;
    transition: left 0.3s ease-in-out, background-color 0.3s, border-color 0.3s;
}

.sidebar::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 40px;
    letter-spacing: -0.5px;
    position: relative;
    top: 0;
    background: var(--bg-sidebar);
    z-index: 10;
    padding-bottom: 10px;
    transition: background-color 0.3s;
}

.brand-icon {
    width: 35px;
    height: 35px;
    background: var(--accent-color);
    color: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.menu-group {
    margin-bottom: 30px;
}

.menu-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1.5px;
    padding-left: 10px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.8;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-link-custom:hover {
    background-color: var(--hover-bg);
    color: var(--text-main);
    opacity: 1;
}

.nav-link-custom.active {
    background-color: var(--text-main);
    color: var(--bg-body);
    font-weight: 600;
    opacity: 1;
    box-shadow: 0 4px 15px var(--shadow-color);
}

[data-theme="dark"] .nav-link-custom.active {
    color: #000;
    background-color: #fff;
}

.region-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
    display: inline-block;
}

.dot-all {
    background-color: #ffc107;
}

.dot-north {
    background-color: #2ecc71;
}

.dot-isan {
    background-color: #ff5722;
}

.dot-central {
    background-color: #ffc107;
}

.dot-south {
    background-color: #0d6efd;
}

.nav-link-custom.active .region-dot {
    border: 2px solid var(--bg-body);
}

/* --- 3. Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px 80px;
    transition: margin-left 0.3s ease-in-out;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.date-display {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-lang {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 5px 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.btn-lang:hover {
    color: var(--text-main);
    background: var(--hover-bg);
}

.btn-lang.active {
    color: var(--text-main);
}

.btn-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.btn-theme-toggle:hover {
    background: var(--hover-bg);
    transform: rotate(15deg);
}

.btn-login-top {
    background: var(--text-main);
    color: var(--bg-body);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.btn-login-top:hover {
    opacity: 0.8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow-color);
    color: var(--bg-body);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 30px;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-main);
    letter-spacing: -2px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 10px;
    max-width: 500px;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    background: var(--bg-card);
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 5px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--text-main);
}

.minimal-search {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 15px;
    font-size: 1.05rem;
    color: var(--text-main);
    outline: none;
}

.search-icon-inside {
    color: var(--text-muted);
    margin-left: 20px;
    font-size: 1.1rem;
}

.btn-search-action {
    background-color: var(--text-main);
    color: var(--bg-body);
    border: none;
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    margin-right: 2px;
}

.btn-search-action:hover {
    transform: scale(1.05);
}

[data-theme="dark"] .btn-search-action {
    background-color: #fff;
    color: #000;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    padding: 0 50px;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 10s ease;
}

.hero-banner:hover .hero-bg {
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
}

.hero-badge {
    background: #ffc107;
    color: #000;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-desc {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    font-weight: 300;
}

.btn-hero-cta {
    background: white;
    color: #000;
    font-weight: 700;
    padding: 10px 25px;
    border-radius: 50px;
    border: none;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.btn-hero-cta:hover {
    background: #ffc107;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.4);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 150px;
    background: var(--bg-card);
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--shadow-color);
    border-color: #ffc107;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--bg-light);
    color: #ffc107;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h4 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
}

.stat-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.region-section-wrapper {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px dashed var(--border-color);
}

.region-section-wrapper:last-child {
    border-bottom: none;
}

.region-head-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main);
}

.region-head-title a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 5px 15px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.region-head-title a:hover {
    background: var(--text-main);
    color: var(--bg-body);
    border-color: var(--text-main);
}

.food-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0;
    border-radius: 20px;
    overflow: visible;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    text-decoration: none;
    height: 100%;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.food-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-color);
    border-color: #ffc107;
}

/* Award Styles */
.food-card.rank-1 {
    border: 2px solid #FFD700;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
    transform: scale(1.02);
    z-index: 10;
}

.food-card.rank-2 {
    border: 2px solid #C0C0C0;
}

.food-card.rank-3 {
    border: 2px solid #CD7F32;
}

.winner-crown {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.2rem;
    color: #FFD700;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: floatCrown 3s ease-in-out infinite;
    z-index: 20;
}

@keyframes floatCrown {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-6px);
    }
}

.card-img-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 20px 20px 0 0;
    position: relative;
    background: var(--bg-light);
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.food-card:hover img {
    transform: scale(1.08);
}

.rank-badge-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffc107;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.9rem;
    z-index: 2;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.badge-group {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    z-index: 3;
}

.badge-item {
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    padding: 3px 10px;
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-hot {
    background: linear-gradient(45deg, #ff4757, #ff6b81);
}

.badge-new {
    background: linear-gradient(45deg, #2ed573, #7bed9f);
}

/* Buttons on Card */
.vote-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.vote-btn i {
    font-size: 1.1rem;
    color: #ccc;
    transition: 0.2s;
}

.vote-btn:hover {
    transform: scale(1.1);
    background: white;
}

.vote-btn:hover i {
    color: #ff4757;
}

.vote-btn.voted {
    background: white;
    cursor: default;
}

.vote-btn.voted i {
    color: #ff4757;
}

/* ✅ Share Button */
.share-btn-card {
    position: absolute;
    top: 12px;
    right: 55px;
    /* อยู่ข้างปุ่มโหวต */
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.share-btn-card i {
    font-size: 1rem;
    color: #666;
}

.share-btn-card:hover {
    transform: scale(1.1);
    background: white;
}

.share-btn-card:hover i {
    color: #000;
}

.card-info {
    padding: 20px;
}

.food-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-vote-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}

.food-shop {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.food-price {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
    margin-left: auto;
    background: var(--bg-light);
    padding: 5px 15px;
    border-radius: 50px;
}

/* Footer & Socials */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--text-main);
    font-weight: 600;
}

.social-icons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: 0.2s;
    border: 1px solid var(--border-color);
}

.social-icons a:hover {
    background: var(--text-main);
    color: var(--bg-body);
    transform: translateY(-3px);
}

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--text-main);
    color: var(--bg-body);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 99;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    bottom: 30px;
}

.scroll-top-btn:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}

.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-box {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border-left: 5px solid #ffc107;
    animation: slideInRight 0.3s forwards, fadeOut 0.5s 2.5s forwards;
    pointer-events: auto;
    min-width: 280px;
}

.toast-box.success {
    border-color: #2ecc71;
}

.toast-box.warning {
    border-color: #ffc107;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-box.success .toast-icon {
    color: #2ecc71;
}

.toast-box.warning .toast-icon {
    color: #ffc107;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

.btn-mobile-menu {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 992px) {
    .sidebar {
        left: -280px;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .btn-mobile-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        width: 45px;
        height: 45px;
        border-radius: 12px;
        font-size: 1.5rem;
        color: var(--text-main);
        margin-right: 15px;
        cursor: pointer;
    }

    .top-bar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 30px;
    }

    .top-actions {
        margin-left: auto;
    }

    .date-display {
        display: none;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .hero-banner {
        height: 400px;
        padding: 30px;
        align-items: flex-end;
    }

    .hero-title {
        font-size: 2rem;
    }

    .stats-bar {
        gap: 15px;
    }

    .toast-container {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }

    .toast-box {
        width: 100%;
    }

    /* --- 4. Detail Page Vote System (Add to bottom of style.css) --- */

    .vote-action-wrapper {
        display: inline-flex;
        align-items: center;
    }

    .vote-pill-btn {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 28px;
        background: var(--bg-card);
        /* พื้นหลังขาวตามธีม */
        border: 2px solid var(--border-color);
        border-radius: 50px;
        color: var(--text-main);
        /* สีตัวอักษรตามธีม (ดำ/ขาว) */
        font-weight: 700;
        font-size: 1.1rem;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        box-shadow: 0 5px 15px var(--shadow-color);
        position: relative;
        overflow: hidden;
    }

    /* Hover State */
    .vote-pill-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        border-color: var(--accent-color);
        /* ขอบสีเหลืองเมื่อเอาเมาส์ชี้ */
    }

    .vote-pill-btn i {
        font-size: 1.4rem;
        color: #e0e0e0;
        /* สีหัวใจเทาๆ ตอนยังไม่กด */
        transition: 0.3s;
    }

    .vote-pill-btn:hover i {
        color: #ff4d6d;
        /* หัวใจแดงอ่อนๆ ตอนชี้ */
    }

    /* Active / Voted State */
    .vote-pill-btn.voted {
        background: var(--accent-color);
        /* เปลี่ยนพื้นหลังเป็นสีเหลือง (#ffc107) */
        border-color: var(--accent-color);
        color: #000 !important;
        /* ตัวอักษรดำเสมอเพื่อให้ตัดกับสีเหลือง */
        pointer-events: none;
        /* ห้ามกดซ้ำ */
        box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    }

    .vote-pill-btn.voted i {
        color: #d63031;
        /* หัวใจสีแดงเข้ม */
        animation: heartBounce 0.6s forwards;
    }

    /* Animation หัวใจเด้ง */
    @keyframes heartBounce {
        0% {
            transform: scale(1);
        }

        40% {
            transform: scale(1.4);
        }

        80% {
            transform: scale(0.9);
        }

        100% {
            transform: scale(1);
        }
    }

    /* Dark Mode Support (ดึงจากตัวแปรที่คุณมีอยู่แล้ว) */
    [data-theme="dark"] .vote-pill-btn {
        background: var(--bg-light);
    }

    /* ปุ่มโหวตแบบ Modern Pill */
    .vote-pill-custom {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 24px;
        background: #ffc107;
        /* สีเหลืองตามธีมคุณ */
        border: none;
        border-radius: 50px;
        color: #000;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    }

    .vote-pill-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    }

    .vote-pill-custom i {
        font-size: 1.5rem;
        color: #fff;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }

    /* สถานะเมื่อโหวตแล้ว */
    .vote-pill-custom.voted {
        background: #e0e0e0;
        color: #888;
        pointer-events: none;
        box-shadow: none;
    }

    .vote-pill-custom.voted i {
        color: #ff4d6d;
    }
/* สไตล์หลักสำหรับ Desktop */
.container {
  display: flex;
}

.sidebar {
  width: 30%;
}

/* สไตล์สำหรับมือถือ (จอเล็กกว่า 768px) */
@media (max-width: 768px) {
  .container {
    flex-direction: column; /* เปลี่ยนจากแนวนอนเป็นแนวตั้ง */
  }
  
  .sidebar {
    width: 100%; /* ให้ความกว้างเต็มจอ */
  }
}
/* ป้องกันการขยายตัวเกินหน้าจอ */
body, html {
    overflow-x: hidden;
    width: 100%;
}

.app-container {
    display: flex;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ปรับให้ Sidebar เลื่อนออกไปนอกหน้าจอในมือถือ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px; /* ย้ายไปทางซ้ายนอกหน้าจอ */
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: 0.3s;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
    }
}