@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap');

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

html, body {
    min-height: 100%;
    font-family: 'Noto Sans Thai', 'Segoe UI', Tahoma, sans-serif;
    color: #102a43;
    background-color: #eaf7fd;
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.vote-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 40px 16px;
}

.brand-header {
    width: 100%;
    max-width: 560px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 6px 4px;
}

.brand-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.brand-title {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.vote-container {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 12px 32px rgba(0, 108, 184, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.95);
}

.name-card-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #0a284b;
    margin-bottom: 8px;
}

.required-star {
    color: #e12d39;
}

.name-input {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid #cbd9e6;
    padding: 0 14px;
    font-size: 16px;
    font-family: inherit;
    color: #102a43;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.name-input:focus {
    border-color: #00a0e9;
    box-shadow: 0 0 0 3px rgba(0, 160, 233, 0.16);
}

.name-helper {
    margin-top: 6px;
    font-size: 13px;
    color: #627d98;
}

.session-pill-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.session-tag {
    background: #0a284b;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.session-subtag {
    background: #dff3fc;
    color: #006cb8;
    font-size: 14px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
}

.session-question {
    font-size: 18px;
    font-weight: 700;
    color: #102a43;
    line-height: 1.45;
    margin-bottom: 14px;
}

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

.choice-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 2px solid #e1edf5;
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.choice-option:hover {
    border-color: #7ccdf5;
    background: #f6fbff;
}

.choice-option.selected {
    border-color: #00a0e9;
    background: #eaf7fd;
    box-shadow: 0 4px 14px rgba(0, 160, 233, 0.16);
}

.choice-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-code {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #27b1ef;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.choice-option.selected .option-code {
    background: #006cb8;
}

.option-label {
    font-size: 15.5px;
    font-weight: 500;
    color: #1c2f44;
    line-height: 1.38;
    flex: 1;
}

.voted-badge-box {
    background: #e6f9f0;
    border: 1.5px solid #3ebd93;
    color: #0e6245;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
}

.voted-badge-box .voted-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

.submit-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #0095e0 0%, #006cb8 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 108, 184, 0.25);
    transition: transform 0.15s ease, opacity 0.2s ease;
}

.submit-btn:active {
    transform: scale(0.985);
}

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

.alert-box {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14.5px;
    font-weight: 600;
    display: none;
}

.alert-box.error {
    display: block;
    background: #ffe3e3;
    color: #ab091e;
    border: 1px solid #f8b4b4;
}

.alert-box.success {
    display: block;
    background: #e6f9f0;
    color: #0e6245;
    border: 1px solid #84e1bc;
}

.footer-note {
    margin-top: 8px;
    font-size: 12.5px;
    color: #627d98;
    text-align: center;
}

@media (max-width: 420px) {
    .brand-logo {
        height: 22px;
    }
    .brand-title {
        height: 28px;
    }
    .card {
        padding: 16px;
        border-radius: 16px;
    }
    .session-question {
        font-size: 16.5px;
    }
    .option-label {
        font-size: 14.5px;
    }
}
