* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f0f0;
    overflow: hidden;
}

.app-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #000;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wifi-icon {
    font-size: 16px;
}

.battery {
    font-size: 12px;
}

/* Camera Container */
.camera-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #000;
}

.camera-preview {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect for selfie */
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Crop Frame Overlay */
.crop-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.crop-overlay {
    position: relative;
    width: 100%;
    height: 100%;
}

.crop-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 370px;
    height: 310px;
    border: 3px solid #007AFF;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    background: transparent;
    pointer-events: none;
}

/* Control Panel */
.control-panel {
    background: #2c2c2e;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: white;
}

.image-counter {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #007AFF;
}

.navigation-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #007AFF;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: #0056CC;
    transform: scale(1.05);
}

.nav-btn:active {
    transform: scale(0.95);
}

.zoom-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
}

.zoom-btn {
    width: 60px;
    height: 50px;
    border-radius: 8px;
    border: none;
    background: #007AFF;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: #0056CC;
    transform: scale(1.05);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.capture-btn, .continue-btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.capture-btn {
    background: #007AFF;
    color: white;
}

.capture-btn:hover {
    background: #0056CC;
    transform: translateY(-2px);
}

.continue-btn {
    background: #34C759;
    color: white;
}

.continue-btn:hover {
    background: #28A745;
    transform: translateY(-2px);
}

.capture-btn:active, .continue-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 480px) {
    .crop-area {
        width: 300px;
        height: 250px;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .zoom-btn {
        width: 50px;
        height: 45px;
        font-size: 20px;
    }
    
    .capture-btn, .continue-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 100px;
    }
}

/* Animation for crop frame movement */
.crop-area {
    transition: all 0.3s ease;
}

/* Loading state */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    z-index: 100;
}

/* Error state */
.error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FF3B30;
    font-size: 16px;
    text-align: center;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
}

