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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-image: url('../images/bg-coast.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 46, 51, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

.demo-container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* Mode Selection Sidebar */
.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    min-width: 60px;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.mode-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #4a6b70;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 14px;
    color: white;
}

.mode-dot:hover {
    background-color: #5a7b80;
    transform: scale(1.1);
}

.mode-dot.active {
    background-color: #00d4aa;
    color: #1a2e33;
}

/* Main Device Screen - Dispenser */
.device-screen {
    flex: 2;
    background-color: #e8f0f2;
    padding: 100px 3vw 20px 3vw;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    height: calc(100vh - 40px);
    border-radius: 4px;
    margin: 40px 0 20px 0;
    position: relative;
}

.device-screen iframe {
    width: min(100%, 1000px);
    height: min(60vw, 600px);
    aspect-ratio: 1000 / 600;
    background-color: white;
    margin: 0 auto;
    border: 2px solid #b8c8cb;
    border-top: 2px solid #9db5b8;
    border-left: 2px solid #9db5b8;
    border-right: 2px solid #d0dde0;
    border-bottom: 2px solid #d0dde0;
    box-shadow: 
        inset 0 0 15px rgba(0, 0, 0, 0.4),
        inset 3px 3px 8px rgba(0, 0, 0, 0.3),
        inset -3px -3px 8px rgba(0, 0, 0, 0.3);
}

/* Right Panel */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    justify-content: center;
    align-items: center;
    height: 100vh;
    min-width: 300px;
}

/* Phone Visual */
.phone-visual {
    position: relative;
    /* flex: 1; */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

.iphone-frame {
    width: 18vw;
    height: 36vw;
    max-width: 320px;
    max-height: 640px;
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border-radius: 40px;
    padding: 4px;
    position: relative;
    box-shadow: 
        0 0 0 2px #333,
        0 0 0 6px #1a1a1a,
        0 8px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
}

.iphone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #000;
    border-radius: 20px;
    z-index: 12;
}

.iphone-screen {
    width: 100%;
    height: calc(100%);
    background: #000;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    margin-top: 0px;
}

.iphone-home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: #444;
    border-radius: 2px;
}

.iphone-screen iframe {
    width: 125%;
    height: 125%;
    border: none;
    background: transparent;
    transform-origin: center center;
    transform: scale(0.8);
    position: absolute;
    top: -12.5%;
    left: -12.5%;
}

.iphone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
}

.phone-disabled-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 46, 51, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
}

.phone-disabled-text {
    color: #9db5b8;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

/* QR Reader on Dispenser */
.qr-reader-dispenser {
    position: absolute;
    bottom: 40px;
    right: calc(50% - min(50%, 500px));
    width: 140px;
    height: 140px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border: 8px solid #b8c8cb;
    border-top: 8px solid #d0dde0;
    border-left: 8px solid #d0dde0;
    border-right: 8px solid #9db5b8;
    border-bottom: 8px solid #9db5b8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.qr-reader-text {
    color: #d0dde0;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.qr-reader-subtext {
    color: #b8c8cb;
    font-size: 10px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.2px;
    margin-top: 2px;
    opacity: 0.8;
}

/* QR Reader Spinner */
.qr-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #d0dde0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* User Selector */
.user-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: auto;
}

.user-label {
    color: #4a6b70;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-dropdown {
    background-color: rgba(74, 107, 112, 0.1);
    border: 2px solid #4a6b70;
    border-radius: 8px;
    color: #4a6b70;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 40px 8px 16px;
    width: 140px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%234a6b70" d="M6 8L0 2h12z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
}

.user-dropdown:hover {
    background-color: rgba(74, 107, 112, 0.2);
    border-color: #5a7b80;
}

.user-dropdown:focus {
    outline: none;
    border-color: #00d4aa;
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
}

.user-selector.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.user-selector.disabled .user-dropdown {
    cursor: not-allowed;
}

.phone-visual.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.scan-qr-button {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00d4aa, #00b894);
    border: none;
    border-radius: 32px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-qr-button:disabled {
    background: linear-gradient(135deg, #6b8085, #4a6b70);
    cursor: not-allowed;
    opacity: 0.7;
}

.scan-qr-button:not(:disabled):hover {
    background: linear-gradient(135deg, #00e6c0, #00c9a7);
    transform: scale(1.02);
}

/* Original QR Reader (now hidden) */
.qr-reader {
    background-color: #4a6b70;
    border-radius: 15px;
    padding: 20px;
    height: 200px;
    position: absolute;
    visibility: hidden;
}

.qr-reader-frame {
    width: 100%;
    height: 100%;
    background-color: #1a2e33;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #00d4aa;
}

.qr-display {
    text-align: center;
}

.qr-placeholder {
    color: #00d4aa;
    font-size: 14px;
}

/* Mode Info */
.mode-info {
    margin-top: 20px;
    padding: 15px 0;
    text-align: center;
}

.mode-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #4a6b70;
    font-weight: 500;
}

.mode-info p {
    font-size: 15px;
    color: #6b8085;
    font-weight: 400;
    max-width: 50%;
    margin: 0 auto;
}


/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .demo-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .mode-selector {
        flex-direction: row;
        min-width: auto;
        width: 100%;
        justify-content: center;
    }
    
    .right-panel {
        width: 100%;
        flex-direction: row;
        justify-content: center;
    }
    
    .device-screen {
        max-width: none;
        height: 400px;
    }
}