:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --ocean-blue: #0ea5e9;
    --ocean-blue-glow: rgba(14, 165, 233, 0.45);
    --ocean-blue-hover: #0284c7;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --glass-bg: rgba(30, 41, 59, 0.5);
    --glass-border: rgba(255, 255, 255, 0.09);
    --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
    
    --transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: clamp(0.5rem, 1.5vh, 1.5rem) 0;
}

/* Background Animations */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 380px;
    height: 380px;
    background: rgba(14, 165, 233, 0.14);
    top: -5%;
    left: 10%;
}

.shape-2 {
    width: 420px;
    height: 420px;
    background: rgba(56, 189, 248, 0.09);
    bottom: -10%;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 260px;
    height: 260px;
    background: rgba(2, 132, 199, 0.12);
    top: 40%;
    left: 45%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(40px, 40px) rotate(180deg); }
}

/* Layout - Center Aligned */
.container {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: clamp(0.8rem, 2.5vw, 1.5rem);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header {
    width: 100%;
    text-align: center;
    margin-bottom: clamp(0.8rem, 2vh, 1.3rem);
    animation: fadeDown 0.6s ease-out;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo {
    font-size: clamp(1.8rem, 4vw, 2.3rem);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--ocean-blue);
}

.logo span {
    color: var(--ocean-blue);
}

.subtitle {
    color: var(--text-muted);
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    text-align: center;
}

/* Hero Wrapper */
.hero-wrapper {
    width: 100%;
    margin-bottom: clamp(0.8rem, 2vh, 1.3rem);
}

/* Glassmorphism Card */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    box-shadow: var(--glass-shadow);
}

.hero-card {
    width: 100%;
    padding: clamp(1.4rem, 3vw, 2rem);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.6s ease-out backwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-card:hover {
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 16px 45px -5px rgba(0, 0, 0, 0.5), 0 0 25px rgba(14, 165, 233, 0.12);
}

.card-header-group {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.8rem;
}

.card-icon {
    font-size: 2.4rem;
    color: var(--ocean-blue);
    margin-bottom: 0.4rem;
    filter: drop-shadow(0 0 10px var(--ocean-blue-glow));
}

.hero-card h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.5rem);
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
    text-align: center;
    max-width: 440px;
}

/* Feature Badges Row */
.feature-badge-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.2rem;
}

.feat-badge {
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.16);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.74rem;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.feat-badge i {
    color: var(--ocean-blue);
    font-size: 0.85rem;
}

/* PIN & Form Area */
.pin-area {
    position: relative;
    width: 100%;
}

.pin-area label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Pin Alert Toast */
.pin-alert-toast {
    display: none;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
    animation: alertSlide 0.25s ease-out;
}

.pin-alert-toast.show {
    display: flex;
}

.pin-alert-toast i {
    font-size: 1rem;
    flex-shrink: 0;
}

@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 1:1 In-line PIN & Button */
.pin-input-group {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

#pin-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 6px;
    outline: none;
    transition: all 0.25s;
}

#pin-input:focus {
    border-color: var(--ocean-blue);
    box-shadow: 0 0 12px var(--ocean-blue-glow);
    background: rgba(0, 0, 0, 0.45);
}

#pin-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 4px;
}

.pin-inline-btn {
    flex: 1.3;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    border: none;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--ocean-blue);
    color: #fff;
    box-shadow: 0 4px 18px var(--ocean-blue-glow);
}

.btn-primary:not(:disabled):hover {
    background-color: var(--ocean-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--ocean-blue-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.btn i {
    font-size: 1.15rem;
    transition: transform 0.25s ease;
}

.btn-primary:not(:disabled):hover i {
    transform: translateX(4px);
}

/* 1:1 In-line Checkbox Box */
.consent-box {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    width: 100%;
}

.consent-block {
    display: flex;
    flex-direction: column;
    position: relative;
}

.consent-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    width: 100%;
}

.consent-header input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-chk {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.consent-header input:checked ~ .custom-chk {
    background: var(--ocean-blue);
    border-color: var(--ocean-blue);
    box-shadow: 0 0 6px var(--ocean-blue-glow);
}

.custom-chk::after {
    content: '';
    display: none;
    width: 3.5px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.consent-header input:checked ~ .custom-chk::after {
    display: block;
}

.consent-title-text {
    color: #f1f5f9;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
}

.consent-desc {
    padding-left: 25px;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.35;
}

.badge-opt {
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    font-weight: 500;
    margin-left: 3px;
}

.badge-req {
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    font-weight: 700;
    margin-left: 3px;
}

/* Shake Animations */
.shake-anim {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.feedback-msg {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    text-align: center;
    min-height: 18px;
    color: #ef4444;
    opacity: 0;
    transition: opacity 0.25s;
    line-height: 1.35;
}

.feedback-msg.show {
    opacity: 1;
}

.feedback-msg.success {
    color: #22c55e;
}

/* Non-intrusive SmartScreen Help Accordion */
.smartscreen-help-box {
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 6px;
    text-align: center;
    width: 100%;
}

.smartscreen-toggle-btn {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    padding: 5px 12px;
    letter-spacing: -0.01em;
}

.smartscreen-toggle-btn i:first-child {
    font-size: 0.95rem;
    color: #f59e0b;
}

.smartscreen-toggle-btn:hover {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fef08a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.smartscreen-toggle-btn .toggle-icon {
    font-size: 0.75rem;
    color: #f59e0b;
    transition: transform 0.25s ease;
}

.smartscreen-help-box.open .smartscreen-toggle-btn {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.6);
    color: #fef08a;
}

.smartscreen-help-box.open .toggle-icon {
    transform: rotate(180deg);
}

.smartscreen-content {
    display: none;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #cbd5e1;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.smartscreen-help-box.open .smartscreen-content {
    display: flex;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.35;
}

.step-num {
    background: rgba(14, 165, 233, 0.25);
    color: #38bdf8;
    font-weight: 700;
    font-size: 0.65rem;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ========================================================
   Top-Right Download & Open Arrow Guidance Overlay
   ======================================================== */
.download-guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.download-guide-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.arrow-indicator-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-width: 360px;
    animation: slideInTop 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideInTop {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.arrow-bounce {
    font-size: 2.4rem;
    color: #38bdf8;
    filter: drop-shadow(0 0 12px var(--ocean-blue-glow));
    animation: bounceArrow 1.2s infinite ease-in-out;
    margin-right: 24px;
}

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

.guide-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(14, 165, 233, 0.25);
    border-radius: 18px;
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.guide-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-card-header i {
    font-size: 1.4rem;
    color: var(--ocean-blue);
}

.guide-card-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
}

.guide-main-text {
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.45;
}

.guide-main-text b {
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.guide-tip-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.74rem;
    color: #94a3b8;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.35;
}

.guide-tip-box i {
    color: #fbbf24;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.guide-tip-box b {
    color: #f1f5f9;
}

.guide-close-btn {
    margin-top: 4px;
    padding: 0.65rem;
    font-size: 0.85rem;
    border-radius: 10px;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    max-width: 540px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transform: translateY(15px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7);
    text-align: left;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-title i {
    font-size: 1.4rem;
    color: var(--ocean-blue);
}

.modal-title h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.modal-body {
    padding: 1.4rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.terms-section h4 {
    color: #38bdf8;
    font-size: 0.9rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.terms-section p {
    color: #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.55;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.4);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.modal-agree-btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    animation: fadeUp 0.6s ease-out 0.4s backwards;
}

/* ========================================================
   6-Digit Auto PIN & Client Info Grid Styling (v25)
   ======================================================== */
.ticket-pin-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(30, 41, 59, 0.6) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ticket-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.ticket-code-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ticket-code {
    font-family: 'JetBrains Mono', 'Pretendard', monospace;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ffffff;
    text-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
}

.btn-refresh-pin {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-refresh-pin:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
    transform: scale(1.05);
}

.rotate-anim i {
    animation: spinOnce 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spinOnce {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.client-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

@media (max-width: 480px) {
    .client-info-grid {
        grid-template-columns: 1fr;
    }
}

.info-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.info-input-wrap label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-input-wrap label .sub-label {
    font-size: 0.7rem;
    font-weight: 400;
    color: #64748b;
}

.info-input-wrap input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    color: #f8fafc;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.info-input-wrap input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    background: rgba(15, 23, 42, 0.85);
}

.start-support-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    margin-top: 4px;
}
