:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
}

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

body {
    font-family: 'Sarabun', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s ease;
}

.brand-logo:hover {
    transform: translateY(-2px);
}

.brand-icon {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.32);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-text h1 {
    font-family: 'Sarabun', 'Outfit', sans-serif;
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.brand-text span {
    font-size: 1.15rem;
    font-weight: 500;
    color: #475569;
    letter-spacing: 0.01em;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    color: #334155;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Main Container */
.main-wrapper {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Card */
.content-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header-hero {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    padding: 36px 40px;
}

.card-header-hero h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.card-body {
    padding: 36px 40px;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-label .req {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-family: inherit;
    font-size: 0.95rem;
    background: #ffffff;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.privacy-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.privacy-banner i {
    color: var(--primary);
    font-size: 1.35rem;
    margin-top: 2px;
}

.privacy-banner p {
    font-size: 0.875rem;
    color: #1e40af;
    line-height: 1.5;
}

.btn-primary-block {
    width: 100%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s;
}

.btn-primary-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

/* Success Box */
.success-screen {
    text-align: center;
    padding: 30px 10px;
}

.token-badge {
    background: #ffffff;
    border: 2px dashed var(--success);
    border-radius: 14px;
    padding: 18px 24px;
    font-family: monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #15803d;
    letter-spacing: 2px;
    margin: 20px auto;
    display: inline-block;
}

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 16px 20px;
        gap: 14px;
    }
    .card-body, .card-header-hero {
        padding: 24px 20px;
    }
}

/* Submit Loading Overlay & Percentage Indicator */
.submit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submit-overlay.active {
    opacity: 1;
}

.submit-modal {
    background: #ffffff;
    border-radius: 24px;
    padding: 36px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.submit-overlay.active .submit-modal {
    transform: scale(1);
}

.spinner-circle {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    position: relative;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
    animation: pulse-plane 2s infinite ease-in-out;
}

@keyframes pulse-plane {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
    }
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 0.925rem;
    color: #64748b;
    margin-bottom: 22px;
    min-height: 24px;
}

.progress-bar-container {
    width: 100%;
    height: 14px;
    background: #e2e8f0;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6, #06b6d4, #2563eb);
    background-size: 300% 100%;
    border-radius: 100px;
    width: 0%;
    transition: width 0.15s ease-out;
    animation: progress-shimmer 2.5s infinite linear;
}

@keyframes progress-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.progress-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.progress-percent {
    font-size: 1.75rem;
    font-weight: 800;
    color: #2563eb;
    font-family: 'Outfit', 'Sarabun', monospace, sans-serif;
    letter-spacing: -0.5px;
}

.modal-footnote {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

