:root {
    --ro-primary: #FFB800;
    --ro-primary-hover: #FFD24D;
    --ro-secondary: #0078D7;
    --ro-bg: #FDF9F1;
    --ro-border: #E8C170;
    --ro-glass: rgba(255, 255, 255, 0.85);
    --ro-glass-border: rgba(255, 184, 0, 0.4);
    --text-main: #333333;
    --text-muted: #666666;
    --font-family: 'Sarabun', sans-serif;
    --font-heading: 'Mali', cursive;
}

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

html {
    font-size: 16px;
}

@media (min-width: 2560px) { html { font-size: 18px; } }
@media (min-width: 3840px) { html { font-size: 22px; } }

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--ro-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #b27a00;
    font-weight: 700;
}

a {
    color: var(--ro-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #005A9E;
}

.ro-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.luxury-nav {
    background: linear-gradient(135deg, #ffffff 0%, #fdf9f1 100%);
    backdrop-filter: blur(15px);
    border-bottom: 4px solid var(--ro-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    gap: 40px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-shield {
    background: #fff;
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(255, 184, 0, 0.3), inset 0 2px 4px rgba(0,0,0,0.05);
    border: 2px solid var(--ro-border);
}

.nav-logo img {
    height: 45px;
    display: block;
    animation: bounceLogo 3s ease-in-out infinite;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: #b27a00;
    text-shadow: 1px 1px 0 #fff;
    white-space: nowrap;
}

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

.nav-link-std {
    color: #555;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 10px 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-link-std i {
    color: var(--ro-primary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.nav-link-std:hover {
    color: var(--ro-secondary);
    background: #f0f7ff;
    transform: translateY(-2px);
}

.nav-link-std:hover i {
    color: var(--ro-secondary);
    transform: scale(1.2);
}

.nav-btn-special {
    background: linear-gradient(135deg, #FFD24D 0%, #FFB800 100%);
    color: #5a4000;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 10px 24px;
    border-radius: 30px;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(255, 184, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-btn-special:hover {
    color: #332400;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 184, 0, 0.6);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--ro-primary);
    background: #fff;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--ro-border);
}

.main-content {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
    z-index: 1;
}

.register-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.mascot-container {
    display: none;
    position: relative;
    width: 280px;
    height: 500px;
}

@media (min-width: 1024px) {
    .mascot-container {
        display: block;
    }
}

.floating-char {
    position: absolute;
    top: 50px;
    width: 100%;
    max-width: 250px;
    filter: drop-shadow(0 15px 20px rgba(0,0,0,0.2));
    animation: floatChar 5s ease-in-out infinite;
    z-index: 2;
}

.floating-pet {
    position: absolute;
    width: 80px;
    filter: drop-shadow(0 8px 10px rgba(0,0,0,0.15));
    z-index: 3;
}

.pet-1 { bottom: 50px; left: -20px; animation: hop 3s ease-in-out infinite; }
.pet-2 { top: 20px; right: -20px; animation: floatPet 4s ease-in-out infinite alternate; width: 100px; }
.pet-3 { bottom: 80px; right: -30px; animation: hop 2.5s ease-in-out infinite 0.5s; }

.delay-1 { animation-delay: 1s; }
.delay-2 { animation-delay: 1.5s; }
.delay-3 { animation-delay: 0.7s; }

@keyframes floatChar {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes floatPet {
    0% { transform: translateY(0px) rotate(-5deg); }
    100% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes hop {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    10% { transform: translateY(0) scale(1.1, 0.9); }
    30% { transform: translateY(-30px) scale(0.9, 1.1); }
    50% { transform: translateY(0) scale(1, 1); }
    60% { transform: translateY(0) scale(1.05, 0.95); }
    70% { transform: translateY(0) scale(1, 1); }
}

.luxury-window {
    width: 100%;
    max-width: 550px;
    background: var(--ro-glass);
    backdrop-filter: blur(20px);
    border: 4px solid #fff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), inset 0 0 0 2px var(--ro-primary);
    overflow: hidden;
    position: relative;
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.9) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.window-header {
    background: linear-gradient(135deg, #fff 0%, #fdf5e6 100%);
    padding: 25px 20px 15px;
    text-align: center;
    border-bottom: 2px dashed var(--ro-border);
}

.window-header h2 {
    font-size: 2.2rem;
    margin: 0;
    color: #b27a00;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 0 2px 4px rgba(0,0,0,0.1);
}

.window-header .subtitle {
    color: var(--ro-secondary);
    font-weight: 500;
    margin-top: 5px;
    font-size: 1.1rem;
}

.window-content {
    padding: 35px;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiAvPgo8cmVjdCB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSIjZjBlYmQ4IiAvPgo8L3N2Zz4=');
}

.form-group {
    margin-bottom: 22px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.half {
    width: 50%;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #444;
    font-size: 1.05rem;
}

label i {
    color: var(--ro-secondary);
    width: 25px;
    text-align: center;
    margin-right: 5px;
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #333;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.form-control:focus {
    outline: none;
    border-color: var(--ro-secondary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 120, 215, 0.15);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

select.form-control {
    cursor: pointer;
}

.agreement-group {
    background: rgba(255, 255, 255, 0.5);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px dashed var(--ro-border);
    margin-bottom: 25px;
}

.agreement-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 500;
}

.agreement-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--ro-primary);
}

.rules-link {
    color: var(--ro-secondary);
    text-decoration: underline;
    font-weight: 700;
}

.rules-link:hover {
    color: #b27a00;
}

.captcha-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-img {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    height: 48px;
}

.btn-refresh {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: var(--ro-secondary);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-refresh:hover {
    background: var(--ro-secondary);
    color: #fff;
    border-color: var(--ro-secondary);
    transform: rotate(180deg) scale(1.1);
}

.form-actions {
    margin-top: 35px;
    text-align: center;
}

.btn-luxury {
    background: linear-gradient(to bottom, #FFD24D 0%, #FFB800 100%);
    color: #6b4c00;
    border: 3px solid #fff;
    padding: 16px 32px;
    font-size: 1.4rem;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    box-shadow: 0 10px 20px rgba(255, 184, 0, 0.3), 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.btn-luxury::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transition: all 0.5s ease;
}

.btn-luxury:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 25px rgba(255, 184, 0, 0.4), 0 6px 10px rgba(0,0,0,0.15);
    color: #4d3600;
}

.btn-luxury:hover::before {
    left: 100%;
}

.btn-luxury:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    border-color: #cbd5e1;
    transform: none;
}

.luxury-footer {
    background: #0f172a;
    position: relative;
    padding: 60px 0 0 0;
    border-top: 6px solid var(--ro-primary);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    color: #e2e8f0;
}

.footer-decoration {
    position: absolute;
    top: -50px;
    right: 10%;
    z-index: 10;
}

.footer-pet {
    width: 100px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
    animation: bounceLogo 3s ease-in-out infinite;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand h3 {
    color: var(--ro-primary);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.footer-logo-img {
    height: 40px;
    filter: drop-shadow(0 2px 5px rgba(255,184,0,0.3));
}

.footer-brand p {
    color: #cbd5e1;
    font-size: 1rem;
    max-width: 400px;
    line-height: 1.8;
}

.footer-links h4, .footer-social h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    position: relative;
    display: inline-block;
}

.footer-links h4::after, .footer-social h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ro-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.footer-links ul li a i {
    color: var(--ro-primary);
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.footer-links ul li a:hover {
    color: var(--ro-primary);
    padding-left: 5px;
}

.footer-links ul li a:hover i {
    transform: translateX(3px);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
    color: #fff;
}

.social-icon.fb:hover { background: #1877F2; border-color: #1877F2; box-shadow: 0 5px 15px rgba(24,119,242,0.4); }
.social-icon.discord:hover { background: #5865F2; border-color: #5865F2; box-shadow: 0 5px 15px rgba(88,101,242,0.4); }
.social-icon.yt:hover { background: #FF0000; border-color: #FF0000; box-shadow: 0 5px 15px rgba(255,0,0,0.4); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: #94a3b8;
    margin: 5px 0;
}

.footer-bottom .highlight {
    color: var(--ro-primary);
    font-weight: 700;
}

.luxury-swal {
    border-radius: 24px !important;
    border: 4px solid #fff !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2) !important;
    background: #fdf9f1 url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiAvPgo8cmVjdCB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSIjZjBlYmQ4IiAvPgo8L3N2Zz4=') !important;
}

.luxury-swal-title {
    font-family: var(--font-heading) !important;
    color: #b27a00 !important;
    font-size: 2rem !important;
}

.luxury-swal-content {
    font-family: var(--font-family) !important;
    font-size: 1.1rem !important;
    color: #444 !important;
}

.luxury-swal-confirm {
    background: linear-gradient(to bottom, #FFD24D 0%, #FFB800 100%) !important;
    color: #6b4c00 !important;
    border: 2px solid #fff !important;
    border-radius: 30px !important;
    font-family: var(--font-heading) !important;
    font-size: 1.2rem !important;
    padding: 12px 30px !important;
    box-shadow: 0 5px 15px rgba(255,184,0,0.3) !important;
}

@media (max-width: 1024px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half {
        width: 100%;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        padding: 20px 0;
        text-align: center;
        border-bottom: 3px solid var(--ro-primary);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-brand, .footer-links, .footer-social {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links h4::after, .footer-social h4::after {
        left: 0;
    }
    
    .footer-decoration {
        right: 50%;
        transform: translateX(50%);
    }
}

@media (max-width: 480px) {
    .register-wrapper {
        gap: 20px;
    }
    .window-header h2 {
        font-size: 1.6rem;
    }
    .window-content {
        padding: 20px;
    }
    .form-control {
        padding: 10px 15px;
        font-size: 1rem;
    }
    .captcha-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .captcha-img {
        width: 100%;
        object-fit: cover;
    }
    .nav-logo .logo-text {
        font-size: 1.4rem;
    }
}

@media (max-height: 700px) {
    .main-content {
        padding: 20px 0;
    }
    .window-header {
        padding: 15px 20px 10px;
    }
    .window-header h2 {
        font-size: 1.8rem;
    }
    .window-content {
        padding: 15px 30px;
    }
    .form-group {
        margin-bottom: 12px;
    }
    .form-control {
        padding: 8px 15px;
    }
    .form-actions {
        margin-top: 20px;
    }
    .btn-luxury {
        padding: 10px 20px;
        font-size: 1.2rem;
    }
    .mascot-container {
        display: none;
    }
}
