* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg,rgb(35, 42, 49) 0%, #e0e7ff 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Mobile keyboard viewport fix */
@supports (padding: max(0px)) {
    body {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

.search-bar {
    display: flex;          /* make children inline horizontally */
    align-items: center;    /* vertically center input and button */
    gap: 10px;              /* optional spacing between input and search button */
}

.search-input-wrapper {
    position: relative;
    flex: 1;                /* input takes remaining space */
    display: flex;          /* allow input and clear button to align */
    align-items: center;
}

#searchInput {
    width: 100%;
    padding-right: 45px;    /* space for clear button */
    padding: 18px 32px;
    border: 1px solid #ccc;
    /*border-radius: 5px;*/
    /*font-size: 18px;*/
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 16px;
    display: none;
    line-height: 1;
}

.clear-btn:hover {
    color: #ef4444;
}

.search-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: none;
    background-color: #2563eb;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.search-btn i {
    margin: 0;
}


.kiosk-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    align-items: stretch;
}

.kiosk-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 10px 30px rgba(14, 165, 233, 0.08);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(14, 165, 233, 0.08);
}

.kiosk-branding {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 50%, #f0f4f8 100%);
    color: #1e3a5f;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.12), 0 10px 40px rgba(14, 165, 233, 0.08);
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kiosk-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.kiosk-branding::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(20px) translateX(-10px);
    }
}

.branding-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    font-size: 60px;
    color: #ffffff;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.1);
    animation: logoGlow 3s ease-in-out infinite;
}

.branding-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    display: block;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.15), inset 0 0 20px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

@keyframes logoGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(14, 165, 233, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 12px 40px rgba(14, 165, 233, 0.4), inset 0 0 30px rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }
}

.branding-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    animation: slideDown 0.6s ease-out;
}

.branding-subtitle {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    animation: slideDown 0.6s ease-out 0.1s both;
}

.branding-event {
    font-size: 14px;
    opacity: 0.75;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding-top: 30px;
    border-top: 2px solid rgba(14, 165, 233, 0.2);
    position: relative;
    z-index: 1;
    animation: slideDown 0.6s ease-out 0.2s both;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.kiosk-header {
    background: #0f172a;
    color: white;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 3px solid #1e293b;
}

.kiosk-header .event-logo {
    width: 70px;
    height: 70px;
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: #0ea5e9;
}

.kiosk-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.kiosk-header .event-date {
    font-size: 16px;
    opacity: 0.85;
}

.kiosk-label {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.7;
    margin-top: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Main Content */
.kiosk-content {
    padding: 50px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

/* States */
.state {
    display: none;
}

.state.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ready State */
.scanner-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    gap: 12px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    padding: 14px 28px;
    border-radius: 12px;
    border: 2px solid rgba(14, 165, 233, 0.25);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

.scanner-dot {
    width: 12px;
    height: 12px;
    background: #0ea5e9;
    border-radius: 50%;
    animation: scanPulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.3);
}

@keyframes scanPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(14, 165, 233, 0);
        transform: scale(1.2);
    }
}

.scanner-status {
    font-size: 13px;
    font-weight: 700;
    color: #0ea5e9;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.qr-icon {
    font-size: 100px;
    color: #0ea5e9;
    margin: 40px 0;
    animation: scanPulse 2.5s ease-in-out infinite;
    filter: drop-shadow(0 8px 24px rgba(14, 165, 233, 0.25));
}

@keyframes scanPulse {
    0%, 100% {
        transform: scale(1) translateY(0);
        filter: drop-shadow(0 8px 24px rgba(14, 165, 233, 0.25));
    }
    50% {
        transform: scale(1.08) translateY(-8px);
        filter: drop-shadow(0 12px 32px rgba(14, 165, 233, 0.4));
    }
}

.ready-message {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin: 20px 0;
    letter-spacing: -0.5px;
}

.ready-subtext {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 45px;
    line-height: 1.5;
}

.btn-custom {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: none;
    color: white;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    min-height: 52px;
}

.btn-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-custom:hover {
    background: linear-gradient(135deg, #0284c7 0%, #026b9f 100%);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.35);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
}

.btn-custom:hover::before {
    left: 100%;
}

.btn-custom:active {
    transform: scale(0.96) translateY(-1px);
}

/* Search State */
.search-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-title::before {
    content: '🔍';
    font-size: 28px;
    opacity: 0.8;
}

.search-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.search-input-wrapper input {
    font-size: 18px;
    padding: 18px 22px;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    flex: 1;
    transition: all 0.3s ease;
    background: white;
    color: #0f172a;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.search-input-wrapper input:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 5px rgba(14, 165, 233, 0.1), 0 6px 20px rgba(14, 165, 233, 0.25);
    transform: translateY(-2px);
    caret-color: #0ea5e9;
}

.search-input-wrapper input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15), 0 4px 12px rgba(14, 165, 233, 0.2);
    transform: translateY(-2px);
    caret-color: #0ea5e9;
}

.search-input-wrapper input::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

.search-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: 2px solid #0284c7;
    color: white;
    padding: 20px 32px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.2);
}

.search-btn i {
    font-size: 18px;
    transition: all 0.3s ease;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #026b9f 100%);
    border-color: #026b9f;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.4);
    transform: translateY(-3px);
}

.search-btn:hover i {
    transform: scale(1.1);
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:active {
    transform: scale(0.96) translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.search-btn.loading i {
    animation: iconSpin 1s linear infinite;
}

@keyframes iconSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #026b9f 100%);
    border-color: #0284c7;
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.35);
    transform: translateY(-3px);
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:active {
    transform: scale(0.96) translateY(-1px);
}

.guest-list {
    max-height: 350px;
    overflow-y: auto;
    margin: 20px 0;
    border-radius: 14px;
    border: 2px solid #dbeafe;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12);
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guest-item {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    animation: fadeInSlide 0.4s ease-out forwards;
    opacity: 0;
}

.guest-item:nth-child(1) {
    animation-delay: 0ms;
}
.guest-item:nth-child(2) {
    animation-delay: 60ms;
}
.guest-item:nth-child(3) {
    animation-delay: 120ms;
}
.guest-item:nth-child(4) {
    animation-delay: 180ms;
}
.guest-item:nth-child(5) {
    animation-delay: 240ms;
}
.guest-item:nth-child(n+6) {
    animation-delay: 300ms;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.guest-item:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f4f8 100%);
    padding-left: 24px;
    border-left: 4px solid #0ea5e9;
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.15);
    transform: translateX(2px);
}

.guest-item:active {
    transform: scale(0.98);
}

/* Scrollbar styling for guest list */
.guest-list::-webkit-scrollbar {
    width: 8px;
}

.guest-list::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.05);
    border-radius: 10px;
}

.guest-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.guest-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0284c7 0%, #026b9f 100%);
}

.guest-item:last-child {
    border-bottom: none;
}

.guest-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.2px;
}

.guest-name::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #0ea5e9;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.25s ease;
}

.guest-item:hover .guest-name::before {
    opacity: 1;
    transform: scale(1);
}

.guest-info {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
    display: flex;
    gap: 18px;
}

.guest-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.no-results {
    color: #64748b;
    padding: 60px 20px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.no-results::before {
    content: '🔍';
    font-size: 32px;
    opacity: 0.6;
    margin-bottom: 8px;
}

/* Loading Results */
.loading-results {
    max-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    /*border-radius: 14px;*/
    /*border: 2px solid #dbeafe;*/
    /*background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);*/
    /*box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12);*/
    padding: 40px 20px;
    gap: 16px;
    animation: slideInUp 0.4s ease-out;
}

.loading-results .spinner-border {
    color: #0ea5e9;
    width: 50px;
    height: 50px;
    border-width: 4px;
    animation: spinnerRotate 1.2s linear infinite;
}

.loading-results {
    font-size: 18px;
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.3px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Processing State */
.spinner-custom {
    margin: 50px 0 40px;
    display: flex;
    justify-content: center;
}

.spinner-custom .spinner-border {
    color: #0ea5e9;
    width: 50px;
    height: 50px;
    border-width: 4px;
    animation: spinnerRotate 1.2s linear infinite;
}

@keyframes spinnerRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.processing-text {
    font-size: 18px;
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.3px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Printing State */
.printing-details {
    background: linear-gradient(135deg, #eef2ff 0%, #f0f4f8 100%);
    border-radius: 16px;
    padding: 40px;
    margin: 40px 0;
    border: 2px solid rgba(14, 165, 233, 0.15);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.1);
    position: relative;
    overflow: hidden;
}

.printing-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 100%);
}

.printing-details .guest-name-large {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.printing-details .guest-details {
    font-size: 16px;
    color: #64748b;
    line-height: 2;
}

.printing-status {
    font-size: 18px;
    color: #0ea5e9;
    font-weight: 600;
    animation: pulse 2s infinite;
    margin-top: 40px;
}

/* Success State */
.success-icon {
    font-size: 80px;
    color: #10b981;
    margin: 30px 0;
    animation: successPulse 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 8px 20px rgba(16, 185, 129, 0.25));
}

@keyframes successPulse {
    0% {
        transform: scale(0) rotate(-15deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.success-message {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin: 20px 0;
    letter-spacing: -0.5px;
}

.success-subtext {
    font-size: 18px;
    color: #64748b;
    margin: 15px 0 45px 0;
    line-height: 1.5;
}

/* Error State */
.error-icon {
    font-size: 80px;
    color: #ef4444;
    margin: 30px 0;
    animation: errorShake 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 8px 20px rgba(239, 68, 68, 0.25));
}

@keyframes errorShake {
    0% {
        transform: scale(0) rotate(15deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.15) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.error-message {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 20px 0;
    letter-spacing: -0.5px;
}

.error-subtext {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 40px;
    line-height: 1.5;
}

/* Mottie Keyboard Customization */
.ui-keyboard {
    margin-top: 25px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.ui-keyboard button {
    background: white !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    min-height: 48px !important;
    transition: all 0.18s ease !important;
    padding: 10px 6px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

.ui-keyboard button:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    color: white !important;
    border-color: #0284c7 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3) !important;
}

.ui-keyboard button:active {
    transform: scale(0.96) translateY(-1px) !important;
}

.ui-keyboard .ui-state-active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    color: white !important;
    border-color: #0284c7 !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3) !important;
}

/* Keyboard navigation buttons (next/prev arrows) */
.ui-keyboard .ui-keyboard-prev::before,
.ui-keyboard .ui-keyboard-next::before {
    content: '‹' !important;
    font-size: 20px !important;
}

.ui-keyboard .ui-keyboard-next::before {
    content: '›' !important;
}

/* Search State Title */
.search-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 1000px) {
    .kiosk-wrapper {
        flex-direction: column;
        gap: 0;
    }

    .kiosk-branding {
        flex: 0 0 auto;
        padding: 35px 28px;
        border-radius: 16px 16px 0 0;
        margin-bottom: 0;
    }

    .kiosk-container {
        border-radius: 0 0 16px 16px;
        order: 2;
    }

    .branding-image {
        max-width: 100%;
        margin-bottom: 18px;
        padding: 10px;
    }

    .branding-logo {
        width: 75px;
        height: 75px;
        font-size: 37px;
        margin-bottom: 15px;
    }

    .branding-title {
        font-size: 23px;
        margin-bottom: 9px;
    }

    .branding-subtitle {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .branding-event {
        font-size: 11px;
        padding-top: 14px;
    }

    .search-btn {
        min-width: 130px;
    }

    .guest-list {
        max-height: 320px;
    }
}

@media (max-width: 480px) {
    .kiosk-content {
        padding: 24px 16px 20px;
    }

    .branding-image {
        max-width: 100%;
        margin-bottom: 16px;
        padding: 6px;
    }

    .branding-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .branding-subtitle {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .ready-message {
        font-size: 22px;
        margin: 16px 0;
    }

    .qr-icon {
        font-size: 60px;
        margin: 18px 0;
    }

    .search-title {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .search-description {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .search-btn {
        font-size: 15px;
        padding: 14px 16px;
    }

    .search-input-wrapper input {
        padding: 14px 16px;
        font-size: 15px;
    }

    .guest-item {
        padding: 12px 13px;
    }

    .guest-name {
        font-size: 14px;
    }
}

@media (max-width: 600px) {
    .kiosk-content {
        padding: 28px 18px 24px;
    }

    .btn-custom {
        width: 100%;
        min-height: 56px;
        font-size: 17px;
        padding: 16px 24px;
    }

    .search-btn {
        width: 100%;
        min-height: 56px;
        padding: 16px 20px;
        font-size: 16px;
    }

    .search-input-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .search-input-wrapper input {
        padding: 16px 18px;
        font-size: 16px;
    }

    .ready-message {
        font-size: 26px;
        margin: 20px 0;
        letter-spacing: 0;
    }

    .qr-icon {
        font-size: 72px;
        margin: 25px 0;
    }

    .search-title {
        font-size: 24px;
        margin-bottom: 18px;
    }

    .search-title::before {
        font-size: 24px;
    }

    .search-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .guest-list {
        max-height: 280px;
        margin: 15px 0;
        border-radius: 12px;
    }

    .guest-item {
        padding: 14px 15px;
    }

    .guest-name {
        font-size: 15px;
    }

    .guest-info {
        font-size: 12px;
        gap: 10px;
        margin-top: 6px;
    }

    .branding-image {
        max-width: 100%;
        margin-bottom: 20px;
        padding: 8px;
    }

    .branding-logo {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 12px;
    }

    .branding-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .branding-subtitle {
        font-size: 12px;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .branding-event {
        font-size: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(14, 165, 233, 0.1);
    }

    .ui-keyboard {
        padding: 12px !important;
    }

    .ui-keyboard button {
        font-size: 12px !important;
        min-height: 44px !important;
        padding: 8px 3px !important;
    }

    .no-results {
        padding: 40px 15px;
        font-size: 15px;
    }

    .no-results::before {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .processing-text {
        font-size: 16px;
    }

    .spinner-custom .spinner-border {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
}

/* Custom Alert System */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.custom-alert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-alert {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-alert-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: iconPulse 0.6s ease;
}

@keyframes iconPulse {
    0% {
        transform: scale(0) rotate(-15deg);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

.custom-alert-content {
    margin-bottom: 30px;
}

.custom-alert-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.custom-alert-message {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.custom-alert-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.alert-btn {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
    flex: 1;
}

.alert-btn-primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #026b9f 100%);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
}

.alert-btn-primary:active {
    transform: scale(0.96);
}

.alert-btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
    flex: 1;
}

.alert-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.alert-btn-secondary:active {
    transform: scale(0.96);
}

/* Alert Type Specific Styling */
.custom-alert-overlay.alert-success .custom-alert-icon {
    color: #10b981;
}

.custom-alert-overlay.alert-success .alert-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.custom-alert-overlay.alert-success .alert-btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

.custom-alert-overlay.alert-error .custom-alert-icon {
    color: #ef4444;
}

.custom-alert-overlay.alert-error .alert-btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.custom-alert-overlay.alert-error .alert-btn-primary:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
}

.custom-alert-overlay.alert-warning .custom-alert-icon {
    color: #f59e0b;
}

.custom-alert-overlay.alert-warning .alert-btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.custom-alert-overlay.alert-warning .alert-btn-primary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
}

.custom-alert-overlay.alert-danger .custom-alert-icon {
    color: #dc2626;
}

.custom-alert-overlay.alert-danger .alert-btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.custom-alert-overlay.alert-danger .alert-btn-primary:hover {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    box-shadow: 0 6px 24px rgba(220, 38, 38, 0.4);
}

.custom-alert-overlay.alert-info .custom-alert-icon {
    color: #0ea5e9;
}

/* Preview Modal */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.preview-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.preview-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    /*width: 100%;*/
    max-width: 900px;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.preview-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.5px;
}

.preview-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.preview-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.preview-modal-close:active {
    transform: scale(0.95);
}

.preview-modal-content {
    padding: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 300px;
    background: #f8fafc;
}

.preview-canvas {
    max-width: 100%;
    height: auto;
    /*border-radius: 12px;*/
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.preview-modal-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    flex-shrink: 0;
}

.preview-modal-note i {
    font-size: 16px;
    flex-shrink: 0;
    color: #f59e0b;
}

.preview-modal-actions {
    display: flex;
    gap: 12px;
    padding: 24px 32px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    justify-content: flex-end;
}

.preview-btn {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.preview-btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
    flex: 1;
    max-width: 180px;
}

.preview-btn-primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #026b9f 100%);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
}

.preview-btn-primary:active {
    transform: scale(0.96);
}

.preview-btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
    flex: 1;
    max-width: 140px;
}

.preview-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-2px);
}

.preview-btn-secondary:active {
    transform: scale(0.96);
}

/* Responsive */
@media (max-width: 768px) {
    .preview-modal-header {
        padding: 20px 24px;
    }

    .preview-modal-title {
        font-size: 20px;
    }

    .preview-modal-content {
        padding: 20px;
        min-height: 250px;
    }

    .preview-modal-actions {
        padding: 16px 24px;
        gap: 8px;
    }

    .preview-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 40px;
    }

    .preview-btn-primary {
        max-width: 100%;
    }

    .preview-btn-secondary {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .preview-modal {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: calc(100vh - 60px);
    }

    .preview-modal-header {
        padding: 16px 20px;
    }

    .preview-modal-title {
        font-size: 18px;
    }

    .preview-modal-content {
        padding: 16px;
        min-height: 200px;
    }

    .preview-modal-actions {
        padding: 12px 16px;
        flex-direction: column;
    }

    .preview-btn {
        width: 100%;
        padding: 12px 16px;
    }

    .preview-btn-primary {
        max-width: 100%;
    }

    .preview-btn-secondary {
        max-width: 100%;
    }
}
