* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; background: #0d0d0d; color: #fff; overflow: hidden; }
.hidden { display: none !important; }
#app { display: flex; flex-direction: column; height: 100vh; }

.app-header { padding: 12px; background: #1a1a1a; text-align: center; }
.app-header h1 { font-size: 16px; font-weight: 600; }

main { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

/* Camera Section - Full Screen */
.camera-section { 
    position: relative; 
    background: #000; 
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    min-height: 60vh;
}
#preview { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
}
.controls { 
    position: absolute; 
    bottom: 20px; 
    left: 50%;
    transform: translateX(-50%);
    display: flex; 
    justify-content: center;
}

/* Big round camera button */
button { 
    border: none; 
    font-weight: 500; 
    cursor: pointer; 
    font-family: inherit;
}
.primary-large { 
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #2a6bf2; 
    color: #fff; 
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(42, 107, 242, 0.4);
    border: 4px solid rgba(255,255,255,0.2);
}
.primary-large:active {
    transform: scale(0.95);
}

.primary { 
    background: #2a6bf2; 
    color: #fff; 
    padding: 12px 16px; 
    border-radius: 8px; 
    font-size: 14px;
}

/* Gallery Section */
.gallery-section { 
    padding: 12px; 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}
.gallery-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.gallery-header h2 { 
    font-size: 14px; 
    font-weight: 600; 
}
.gallery { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); 
    gap: 8px; 
}
.thumb { 
    position: relative; 
    aspect-ratio: 1; 
    border-radius: 8px; 
    overflow: hidden; 
    background: #1a1a1a; 
}
.thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.thumb button { 
    position: absolute; 
    bottom: 4px; 
    right: 4px; 
    padding: 4px 8px; 
    font-size: 10px; 
    background: rgba(211,47,47,0.9); 
    color: #fff;
    border-radius: 4px;
}

/* Footer - smaller submit button */
.footer { 
    padding: 12px; 
    background: #1a1a1a; 
}
.cta-small { 
    background: #2abf6b; 
    color: #fff; 
    width: 100%; 
    padding: 12px; 
    font-size: 14px;
    border-radius: 8px;
}
.cta-small:disabled { 
    background: #333; 
    color: #666; 
    cursor: not-allowed; 
}

.status { 
    margin-top: 6px; 
    font-size: 12px; 
    color: #999; 
    text-align: center;
    white-space: pre-line;
    line-height: 1.4;
}

.progress { 
    display: grid; 
    gap: 4px; 
    margin-top: 8px; 
}
.progress-bar { 
    height: 4px; 
    background: #333; 
    border-radius: 2px; 
    overflow: hidden; 
}
.progress-bar::after { 
    content: ''; 
    display: block; 
    height: 100%; 
    background: linear-gradient(90deg, #2abf6b, #2a6bf2); 
    animation: progress 2s ease-in-out infinite; 
}
.progress-text { 
    font-size: 12px; 
    color: #666; 
    text-align: center; 
}
@keyframes progress { 
    0% { width: 0%; } 
    50% { width: 70%; } 
    100% { width: 100%; } 
}

#ios-fallback { 
    padding: 16px; 
    text-align: center; 
}
