/* style.css - Jewels-Ai Atelier: Try All Repositioned */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Montserrat:wght@400;600&display=swap');

:root {
  --accent: #d4af37;           /* Gold */
  --accent-glow: rgba(212, 175, 55, 0.4);
  --bg: #000;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-dark: rgba(0, 0, 0, 0.7);
  --text-main: #fff;
  --text-muted: #ccc;
}

body { 
  margin: 0; 
  background: var(--bg); 
  font-family: 'Montserrat', sans-serif; 
  overflow: hidden; 
  color: var(--text-main); 
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* --- 1. FLASH EFFECT --- */
#flash-overlay {
    position: fixed; inset: 0; background: white; z-index: 9999;
    opacity: 0; pointer-events: none; display: none;
}
.flash-active {
    display: block !important;
    animation: flash-animation 0.25s ease-out forwards;
}
@keyframes flash-animation { 0% { opacity: 0.8; } 100% { opacity: 0; } }

/* --- 2. VIDEO & AR LAYERS --- */
#video-container { position: fixed; inset: 0; z-index: 0; background: black; }
#webcam { position: absolute; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#overlay { position: absolute; width: 100%; height: 100%; object-fit: cover; z-index: 1; pointer-events: none; }

/* --- 3. LOADING STATUS --- */
#loading-status {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85); color: var(--accent); padding: 20px 40px;
    border-radius: 12px; border: 1px solid var(--accent);
    font-family: 'Playfair Display'; font-size: 18px; z-index: 500; backdrop-filter: blur(5px);
}

/* --- 4. HEADER & CONTROLS --- */
#controls-hero {
  position: fixed; top: 0; left: 0; right: 0; padding: 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
  z-index: 10; display: flex; flex-direction: column; align-items: center;
}
.brand-row { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 800px; }
.brand-left { display: flex; align-items: center; }
.brand-logo { height: 40px; }

.action-row { display: flex; gap: 15px; align-items: center; }

#snapshot-btn, #voice-btn {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3);
  padding: 0; border-radius: 50%; cursor: pointer; color: white; font-size: 20px; transition: all 0.2s;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
}
#snapshot-btn:active, #voice-btn:active { transform: scale(0.9); background: rgba(255,255,255,0.3); }

.voice-off {
    color: #ff5555 !important;
    border-color: #ff5555 !important;
    background: rgba(255, 85, 85, 0.1) !important;
}

/* --- 5. BOTTOM CONTROLS --- */
.controls-panel {
  position: fixed; bottom: 20px; width: 100%; 
  display: flex; flex-direction: column; align-items: center; z-index: 15;
}

/* Try All Button Specific Styling */
#tryall-btn {
    margin-bottom: 12px;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.pill-group { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; padding: 0 10px; }
.pill {
  padding: 10px 20px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.2); 
  background: rgba(0,0,0,0.6); color: white; font-size: 13px; font-weight: 600; 
  cursor: pointer; backdrop-filter: blur(5px); transition: all 0.2s ease;
}
.pill:hover { background: rgba(255,255,255,0.2); border-color: var(--accent); }
.pill.accent { background: var(--accent); color: #000; border: none; font-weight: 700; box-shadow: 0 0 10px var(--accent-glow); }

.carousel-cards {
  display: flex; gap: 10px; overflow-x: auto; padding: 10px; max-width: 100%;
  scrollbar-width: none;
}
.carousel-cards::-webkit-scrollbar { display: none; }
.thumb-btn { 
  height: 60px; width: 60px; object-fit: contain; background: rgba(0,0,0,0.6);
  padding: 5px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); cursor: pointer; transition: transform 0.2s;
}
.thumb-btn:active { transform: scale(0.95); border-color: var(--accent); }

/* --- 6. MODALS BASE --- */
#preview-modal, #gallery-modal, #lightbox-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 2000;
    display: none; flex-direction: column; align-items: center; justify-content: center; backdrop-filter: blur(8px);
}
.preview-container, .lightbox-main {
    width: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; padding: 20px;
}
#preview-image, #lightbox-image {
    max-width: 100%; max-height: 70vh; border: 2px solid var(--accent);
    border-radius: 12px; box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.preview-actions { margin-top: 20px; display: flex; gap: 15px; }

/* Lightbox Nav */
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: 50px; color: rgba(255,255,255,0.6); cursor: pointer;
    padding: 20px; user-select: none; z-index: 2002; transition: all 0.3s ease;
}
.lightbox-nav:hover { color: var(--accent); transform: translateY(-50%) scale(1.2); }
.prev { left: 10px; }
.next { right: 10px; }

/* --- 7. PREMIUM GALLERY UI --- */
.gallery-content {
    background: rgba(18, 18, 18, 0.95); 
    width: 90%; max-width: 900px; height: 80vh;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    display: flex; flex-direction: column;
    position: relative;
    overflow: hidden;
}
.gallery-content h2 {
    margin-top: 0; margin-bottom: 20px;
    font-size: 26px; text-transform: uppercase; letter-spacing: 2px;
    background: linear-gradient(to right, #d4af37, #fdf5e6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}
#gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px; overflow-y: auto; padding: 10px; flex-grow: 1;
}
#gallery-grid::-webkit-scrollbar { width: 6px; }
#gallery-grid::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
#gallery-grid::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.gallery-card {
    position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden;
    cursor: pointer; background: #000; border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.gallery-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.gallery-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-card:hover .gallery-img { transform: scale(1.1); }
.gallery-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    padding: 20px 10px 10px 10px; display: flex; justify-content: space-between; align-items: flex-end;
    opacity: 0; transform: translateY(10px); transition: all 0.3s ease;
}
.gallery-card:hover .gallery-overlay { opacity: 1; transform: translateY(0); }
.overlay-text { font-size: 11px; color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.overlay-icon { font-size: 14px; color: var(--accent); }

.close-preview, .close-gallery, .close-lightbox {
    position: absolute; top: 15px; right: 20px; font-size: 30px; color: #888; cursor: pointer; z-index: 2001; transition: color 0.2s;
}
.close-preview:hover, .close-gallery:hover, .close-lightbox:hover { color: var(--accent); }

/* --- 8. WHATSAPP & SPINNER --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 6000;
    display: none; align-items: center; justify-content: center;
}
.modal-box {
    background: #1a1a1a; padding: 30px; border-radius: 15px; 
    border: 1px solid var(--accent); text-align: center; width: 350px; max-width: 85%;
}
.input-dark {
    width: 90%; padding: 12px; margin: 15px 0; border-radius: 8px;
    border: 1px solid #444; background: #222; color: white; outline: none; text-align: center;
}
.input-dark:focus { border-color: var(--accent); }
.btn-text { background: none; border: none; color: #888; margin-top: 15px; cursor: pointer; text-decoration: underline; }

#process-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 4000;
    display: none; align-items: center; justify-content: center;
}
.process-box { text-align: center; }
.spinner {
    width: 50px; height: 50px; margin: 0 auto 15px auto;
    border: 4px solid rgba(255,255,255,0.1); border-top: 4px solid var(--accent);
    border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
/* --- 9. DYNAMIC CAMERA MIRRORING --- */
/* When class 'no-mirror' is added via JS, stop flipping the video */
#webcam.no-mirror {
    transform: none !important; 
}