* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}
body {
    font-family: 'Sarabun', sans-serif !important;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    color: #555555;
    font-size: 12px !important;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}
.sweet-alert {
    font-family: 'Sarabun', sans-serif !important;
    border-radius: 20px !important;
}
.poll-wrapper {
    width: 100%;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}
.poll-header {
    background-color: rgb(15 23 42); 
    color: white;
    padding: 10px 15px 0px;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid rgb(30 41 59); 
}
.poll-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03); 
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}
.poll-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-20px) translateX(10px); }
}
.poll-title {
    font-weight: 700;
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    margin: 25px auto;
    font-size: 16px;
}
.poll-description {
    opacity: 0.95;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.poll-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    animation: slideDown 1s ease;
    backdrop-filter: blur(10px);
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.question-section {
    padding: 0 0 35px 0;
}
.question-header {
    background: linear-gradient(135deg, #fff8f0 0%, #ffe8cc 100%);
    padding: 12px 10px;
    border-bottom: 1px solid #1a2a6c;
    animation: fadeIn 0.5s ease;
}
.question-text {
    font-weight: 600;
    color: #333;
    line-height: 1.5;
}
.required-badge {
    color: #e53e3e;
    margin-left: 5px;
}
.filters-section {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: slideDown 0.6s ease;
}
.search-box {
    margin-bottom: 15px;
}
.search-input-wrapper {
    position: relative;
}
.search-input {
    width: 100%;
    padding: 7px 23px 7px 35px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-family: 'Sarabun', sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
}
.search-input:focus {
    outline: none;
    border-color: #1a2a6c;
    box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.1);
    background: white;
}
.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}
.clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #f0f0f0;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 50%;
    display: none;
    transition: all 0.3s ease;
}
.clear-search:hover {
    background: #e0e0e0;
}
.clear-search.show {
    display: block;
    animation: scaleIn 0.3s ease;
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}
.party-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.party-filters::-webkit-scrollbar {
    display: none;
}
.party-chip {
    background: white;
    border: 1px solid #e0e0e0;
    color: #666;
    padding: 4px 16px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.party-chip:hover {
    border-color: #1a2a6c;
    color: #1a2a6c;
    transform: translateY(-2px);
}
.party-chip.active {
    background: linear-gradient(135deg, #1a2a6c 0%, #2a3439 100%);
    border-color: #1a2a6c;
    color: white;
}
.options-container {
    padding: 25px;
}
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.option-card {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 5px;
    opacity: 0;
    animation: cardFadeIn 0.5s ease forwards;
}
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.option-card:hover {
    transform: translateY(-5px);
}
.option-card.selected {
    background: linear-gradient(135deg, rgb(30 41 59) 0%, rgb(51 65 85) 100%);
    border-color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
    transform: scale(1.02);
    color: #f8fafc;
    position: relative;
    z-index: 10;
    padding: 5px;
}
.option-card.hidden {
    display: none;
}
.check-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 3px solid #d8d8d8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.option-card.selected .check-indicator {
    background: #1a2a6c;
    border-color: #1a2a6c;
    transform: rotate(360deg) scale(1.1);
}
.check-indicator i {
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.option-card.selected .check-indicator i {
    opacity: 1;
}
.option-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    border-radius: 5px;
}
.option-content {
    text-align: center;
    width: 100%;
}
.option-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 7px;
}
.option-party {
    color: #888;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 8px;
}
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    grid-column: 1 / -1;
    animation: fadeIn 0.5s ease;
}
.no-results i {
    margin-bottom: 20px;
    opacity: 0.3;
}
.load-more-container {
    text-align: center;
    padding: 20px;
    display: none;
}
.load-more-container.show {
    display: block;
}
.load-more-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #1a2a6c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.submit-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 15px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideUp 0.5s ease;
    width: 100%;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.submit-bar-inner {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.selected-info {
    color: #666;
    text-align: center;
    transition: all 0.3s ease;
}
.selected-name {
    color: #1a2a6c;
    font-weight: 700;
}
.submit-btn {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1a2a6c 0%, #2a3439 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Sarabun', sans-serif;
    position: relative;
    overflow: hidden;
    font-size: 13px;
}
.btn-home {
    margin: 0 auto;
    background: linear-gradient(135deg, #1a2a6c 0%, #2a3439 100%);
    color: white;
    border: none;
    padding: 7px 8px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Sarabun', sans-serif;
    position: relative;
    overflow: hidden;
    font-size: 10px;
}
.submit-btn.show {
    display: block;
}
.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.submit-btn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
    cursor: not-allowed;
    box-shadow: none;
}
.submit-btn:disabled:hover {
    transform: none;
}
.submit-btn i {
    margin-right: 8px;
}
.loading {
    display: none;
    text-align: center;
    padding: 80px 20px;
}
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f0f0f0;
    border-top-color: #1a2a6c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
.success-message {
    display: none;
    text-align: center;
    padding: 80px 20px;
    animation: fadeIn 0.6s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    font-size: 48px;
}
@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.success-icon i {
    color: white;
}
.success-text {
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}
.success-subtext {
    color: #666;
}
.logo {
    height: 65px;
}
@media (max-width: 768px) {
    .poll-wrapper {
        max-width: 100%;
    }
    .options-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    .submit-btn {
        padding: 7px 14px;
    }
    .logo {
        height: 45px;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .options-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
@media (min-width: 1025px) {
    .options-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .submit-bar {
        left: 50%;
        transform: translateX(-50%);
    }
}
.language-menu {
    padding-bottom: 6px;
    cursor: pointer;
    position: fixed;
    top: 10px;
    right: 15px;
    display: flex;
    align-items: center; 
    background-color: #FFFFFF;
    padding: 5px;
    border-radius: 5px;
    z-index: 3;
    gap: 10px;
}
.language-menu > div {
    display: inline-block;
}
.language-menu > div:not(:first-child)::before {
    margin: 0 6px;
    font-weight: 400;
    color: #555555;
}
.language-menu > div.lang-active {
    text-decoration: none;
    font-weight: 700;
    color: #1a2a6c;
    border: 1px solid #1a2a6c;
    padding: 5px;
    border-radius: 5px;
}
.bottom-actions-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    gap: 10px;
    justify-content: center;
}
.btn-fixed-bottom {
    flex: 1;
    max-width: 400px;
    padding: 12px;
    border-radius: 30px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.sweet-alert[data-has-confirm-button=false][data-has-cancel-button=false] {
    margin-bottom: 25px !important;
}
.sweet-alert button {
    border-radius: 20px !important;
    font-size: 14px !important;
}
.poll-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
.slide-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
#pollPage { z-index: 2; transform: translateY(0); }
#dashboardPage { z-index: 1; transform: translateY(100%); }
#pollPage.prev { transform: translateY(-100%); }
#dashboardPage.active { transform: translateY(0); z-index: 3; }
.slide-page {
    overscroll-behavior-y: contain;
}
.sweet-alert h2 {
    margin-bottom: 15px !important;
}