/* GLOBAL & BODY */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow: hidden;
}

/* APP CONTAINER */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    background: #ffffff;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

/* HEADER */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 20px 16px;
    text-align: center;
    color: #ffffff;
    flex-shrink: 0;
}

.app-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

/* CONTENT */
.app-content {
    padding: 16px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* CAROUSEL CONTAINER */
.carousel-container {
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 -20px 16px;
    padding: 0 20px;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 10px;
    padding-bottom: 4px;
}

/* TYPE CHIPS */
.type-chip {
    background: #f1f3f5;
    border: 2px solid #e9ecef;
    border-radius: 24px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.type-chip.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.chip-icon {
    font-size: 18px;
    line-height: 1;
}

.chip-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.type-chip.active .chip-label {
    color: #ffffff;
}

/* QR DISPLAY */
.qr-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
    height: 240px;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.placeholder-icon {
    font-size: 40px;
    opacity: 0.4;
}

.placeholder-text {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

#qrcode img,
#qrcode canvas {
    max-width: 200px;
    max-height: 200px;
    height: auto;
    border-radius: 12px;
}

/* INPUT SECTIONS */
.input-section {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.app-input {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.app-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.app-input::placeholder {
    color: #a0aec0;
}

/* SECURITY BUTTONS */
.security-buttons {
    display: flex;
    gap: 8px;
}

.security-btn {
    flex: 1;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.security-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

/* ACTION BUTTONS */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-generate {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.btn-generate:active {
    transform: scale(0.98);
}

.btn-download {
    width: 56px;
    background: #2d3748;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 20px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-download:active {
    transform: scale(0.98);
}

.download-icon {
    line-height: 1;
}

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

.mb-2 {
    margin-bottom: 8px;
}

/* RESPONSIVE - SMALLER PHONES */
@media (max-height: 700px) {
    .app-header {
        padding: 16px 20px 12px;
    }
    
    .app-title {
        font-size: 20px;
    }
    
    .qr-display {
        height: 200px;
        padding: 16px;
    }
    
    #qrcode img,
    #qrcode canvas {
        max-width: 170px;
        max-height: 170px;
    }
    
    .app-input {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-height: 650px) {
    .qr-display {
        height: 180px;
    }
    
    #qrcode img,
    #qrcode canvas {
        max-width: 150px;
        max-height: 150px;
    }
}
