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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

#app {
    max-width: 1024px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

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

/* Welcome Screen */
#welcome-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 10px;
    transition: opacity 0.3s ease;
}

.logo p {
    color: #888;
    font-size: 1.2rem;
}

.welcome-content {
    margin-top: 60px;
}

.qr-icon {
    color: #4a90d9;
    margin-bottom: 40px;
    animation: qrPulse 2s ease-in-out infinite;
}

@keyframes qrPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.welcome-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.welcome-content > p {
    color: #aaa;
    margin-bottom: 40px;
}

.welcome-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
}

.welcome-buttons .btn {
    margin-top: 0;
}

.checkout-message {
    font-size: 1.3rem;
    color: #aaa;
    margin: 20px 0;
}

/* Buttons */
.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #357abd 0%, #2a5f8f 100%);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: #4a90d9;
    border: 2px solid #4a90d9;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: rgba(74, 144, 217, 0.1);
}

.btn-checkout {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.btn-checkout:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
}

.btn-large {
    padding: 20px 60px;
    font-size: 1.3rem;
    width: 100%;
    max-width: 400px;
}

.btn-back {
    background: none;
    border: none;
    color: #4a90d9;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 10px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.header h2 {
    font-size: 1.8rem;
    font-weight: 400;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    gap: 10px;
}

.lang-btn {
    padding: 8px 15px;
    border: 1px solid #555;
    background: transparent;
    color: #888;
    border-radius: 5px;
    cursor: pointer;
}

.lang-btn.active {
    border-color: #4a90d9;
    color: #4a90d9;
}

/* Scan Screen */
.scan-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.kiosk-qr-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 30px;
}

.qr-display {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(74, 144, 217, 0.3);
}

.qr-display img, .qr-display canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-scanning-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    overflow: hidden;
    pointer-events: none;
}

.scan-line-animated {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4a90d9, transparent);
    box-shadow: 0 0 10px #4a90d9;
    animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {
    0%, 100% { top: 10%; opacity: 0.5; }
    50% { top: 85%; opacity: 1; }
}

.scan-instruction {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 10px;
}

.scan-waiting {
    color: #4a90d9;
    font-size: 1.1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

#qr-reader {
    width: 100%;
    max-width: 500px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
}

/* Manual Screen */
.manual-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
}

.manual-icon {
    color: #4a90d9;
    margin-bottom: 15px;
}

.manual-instruction {
    color: #aaa;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* Input Mode Toggle */
.input-mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #444;
    border-radius: 25px;
    background: transparent;
    color: #888;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    border-color: #666;
    color: #aaa;
}

.mode-btn.active {
    border-color: #4a90d9;
    background: rgba(74, 144, 217, 0.15);
    color: #4a90d9;
}

.code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #4a90d9;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 15px;
    min-width: 300px;
}

/* Keyboard Input Wrapper */
.keyboard-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #4a90d9;
    border-radius: 15px;
    padding: 10px 20px;
    margin-bottom: 15px;
    min-width: 300px;
}

.keyboard-input-wrapper .code-prefix {
    font-size: 1.8rem;
    font-weight: 600;
    color: #666;
    margin-right: 5px;
}

.keyboard-input-wrapper input {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    width: 180px;
    outline: none;
}

.keyboard-input-wrapper input::placeholder {
    color: #555;
}

.code-prefix {
    font-size: 1.8rem;
    font-weight: 600;
    color: #666;
    margin-right: 5px;
}

.code-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
}

/* Virtual Keyboard */
.virtual-keyboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    width: 100%;
    max-width: 350px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.key {
    width: 70px;
    height: 60px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key:hover {
    background: rgba(74, 144, 217, 0.3);
    transform: translateY(-2px);
}

.key:active {
    background: #4a90d9;
    transform: translateY(0);
}

.key.letter {
    background: rgba(74, 144, 217, 0.2);
}

.keyboard-row.actions {
    margin-top: 10px;
}

.key-delete {
    background: rgba(244, 67, 54, 0.2);
    flex: 1;
    max-width: 100px;
}

.key-delete:hover {
    background: rgba(244, 67, 54, 0.4);
}

.key-clear {
    background: rgba(255, 255, 255, 0.05);
    flex: 1;
    max-width: 150px;
    font-size: 1rem;
}

.key-clear:hover {
    background: rgba(255, 255, 255, 0.15);
}

.form-group {
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #aaa;
    font-size: 1.1rem;
}

.input-large {
    width: 100%;
    padding: 20px;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid #444;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-transform: uppercase;
}

.input-large:focus {
    outline: none;
    border-color: #4a90d9;
}

/* Status Messages */
.status {
    margin-top: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1rem;
}

.status.error {
    background: rgba(244, 67, 54, 0.2);
    color: #ff6b6b;
}

.status.success {
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
}

/* Confirm Screen */
.confirm-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reservation-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
}

.guest-info {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.guest-info h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.guest-info p {
    color: #888;
}

.reservation-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item .label {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.detail-item .value {
    font-size: 1.3rem;
    font-weight: 500;
}

/* Terms Section */
.terms-section {
    margin-bottom: 30px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #aaa;
}

.checkbox-container input {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* Success Screen */
.success-content, .error-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.success-icon, .error-icon {
    margin-bottom: 30px;
}

.key-info, .wristband-info {
    margin: 30px 0;
}

.key-info p, .wristband-info p {
    color: #888;
    margin-bottom: 10px;
}

.key-code, .wristband-code {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4a90d9;
    letter-spacing: 5px;
    padding: 20px 40px;
    background: rgba(74, 144, 217, 0.1);
    border-radius: 10px;
    border: 2px dashed #4a90d9;
}

.room-info-large {
    margin: 20px 0;
}

.room-info-large p {
    color: #888;
    margin-bottom: 10px;
}

.room-number-large {
    font-size: 4rem;
    font-weight: bold;
    color: #4CAF50;
}

.instructions {
    color: #888;
    margin: 30px 0;
    font-size: 1.1rem;
}

/* Loading Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid #333;
    border-top: 4px solid #4a90d9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Checkout Confirm Screen - Minimal */
.checkout-confirm-minimal {
    align-items: center;
    padding-top: 40px;
}

.minimal-room {
    text-align: center;
    margin-bottom: 30px;
}

.minimal-room-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.minimal-room-number {
    display: block;
    font-size: 4rem;
    font-weight: 300;
    color: #f59e0b;
}

.minimal-guest {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 40px;
    font-weight: 300;
}

.minimal-dates {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.minimal-date {
    text-align: center;
}

.minimal-label {
    display: block;
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.minimal-value {
    color: #fff;
    font-size: 1.1rem;
}

.minimal-separator {
    color: #444;
    font-size: 1.5rem;
}

.minimal-summary {
    width: 100%;
    max-width: 300px;
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-bottom: 40px;
}

.minimal-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: #888;
    font-size: 1rem;
}

.minimal-row.total {
    border-top: 1px solid #333;
    margin-top: 10px;
    padding-top: 15px;
    color: #f59e0b;
    font-size: 1.3rem;
    font-weight: 500;
}

/* Checkout Input Screen - Minimal */
.checkout-input-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding-bottom: 60px;
}

.checkout-field {
    text-align: center;
}

.checkout-input-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.checkout-room-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid #444;
    font-size: 4rem;
    font-weight: 200;
    color: #fff;
    text-align: center;
    width: 200px;
    padding: 10px;
    outline: none;
    transition: border-color 0.3s ease;
}

.checkout-room-input:focus {
    border-bottom-color: #f59e0b;
}

.checkout-room-input::placeholder {
    color: #333;
}

.checkout-code-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #444;
    transition: border-color 0.3s ease;
}

.checkout-code-wrapper:focus-within {
    border-bottom-color: #f59e0b;
}

.checkout-code-prefix {
    font-size: 1.8rem;
    font-weight: 300;
    color: #555;
}

.checkout-code-input {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    font-weight: 300;
    color: #fff;
    width: 180px;
    padding: 10px 5px;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.checkout-code-input::placeholder {
    color: #333;
}

.checkout-input-content .status {
    min-height: 30px;
}

.checkout-input-content .btn {
    margin-top: 10px;
}

/* Checkout Success Screen */
.checkout-success {
    padding-top: 40px;
}

.checkout-success-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    animation: slideIn 0.5s ease-out;
}

.checkout-success-icon svg {
    filter: drop-shadow(0 4px 20px rgba(245, 158, 11, 0.4));
}

.checkout-check-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn 0.3s ease-out 0.3s both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes popIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.checkout-title {
    font-size: 2.2rem;
    color: #f59e0b;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-out 0.2s both;
}

.checkout-card {
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    padding: 30px 50px;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-out 0.4s both;
}

.checkout-emoji {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: wave 1s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.checkout-thanks {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.checkout-farewell {
    font-size: 1.1rem;
    color: #aaa;
}

.checkout-rating {
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-out 0.6s both;
}

.checkout-rating p {
    color: #888;
    margin-bottom: 15px;
}

.rating-stars {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.rating-stars .star {
    font-size: 2rem;
    cursor: pointer;
    filter: grayscale(100%);
    transition: all 0.2s ease;
}

.rating-stars .star:hover,
.rating-stars .star.active {
    filter: grayscale(0%);
    transform: scale(1.2);
}

.rating-stars:hover .star {
    filter: grayscale(0%);
}

.rating-stars .star:hover ~ .star {
    filter: grayscale(100%);
}

/* Responsive */
@media (max-width: 768px) {
    .screen {
        padding: 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .welcome-content h2 {
        font-size: 1.5rem;
    }

    .btn-large {
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    .reservation-details {
        grid-template-columns: 1fr;
    }

    .key-code, .wristband-code {
        font-size: 1.8rem;
        padding: 15px 25px;
    }

    .room-number-large {
        font-size: 3rem;
    }

    /* Checkout screens mobile */
    .checkout-input-content {
        gap: 30px;
        padding: 20px;
        padding-bottom: 40px;
    }

    .checkout-room-input {
        font-size: 3rem;
        width: 150px;
    }

    .checkout-code-prefix {
        font-size: 1.4rem;
    }

    .checkout-code-input {
        font-size: 1.4rem;
        width: 140px;
    }

    .checkout-input-label {
        font-size: 0.8rem;
    }

    /* Checkout confirm mobile */
    .minimal-room-number {
        font-size: 3rem;
    }

    .minimal-guest {
        font-size: 1.3rem;
        margin-bottom: 30px;
    }

    .minimal-dates {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }

    .minimal-separator {
        transform: rotate(90deg);
    }

    .minimal-summary {
        max-width: 100%;
    }

    /* Checkout success mobile */
    .checkout-card {
        padding: 20px 30px;
    }

    .checkout-emoji {
        font-size: 3rem;
    }

    .checkout-thanks {
        font-size: 1.2rem;
    }

    .checkout-title {
        font-size: 1.8rem;
    }

    .rating-stars .star {
        font-size: 1.5rem;
    }

    /* Language selector mobile */
    .language-selector {
        top: 15px;
        right: 15px;
        gap: 5px;
        flex-wrap: wrap;
        max-width: 200px;
        justify-content: flex-end;
    }

    .lang-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    /* Header mobile */
    .header {
        margin-bottom: 20px;
    }

    .header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 400px) {
    .checkout-room-input {
        font-size: 2.5rem;
        width: 120px;
    }

    .checkout-code-prefix {
        font-size: 1.2rem;
    }

    .checkout-code-input {
        font-size: 1.2rem;
        width: 120px;
        letter-spacing: 1px;
    }

    .minimal-room-number {
        font-size: 2.5rem;
    }

    .btn-large {
        padding: 12px 20px;
        font-size: 1rem;
        width: 100%;
    }

    .welcome-buttons {
        padding: 0 10px;
    }
}
