/* Main CSS for Mornee Jewellery Virtual Try-On */
/* Core styles that work with the enhanced template */

/* CSS Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Modern Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --danger-gradient: linear-gradient(135deg, #eb3b5a 0%, #fc5c65 100%);
    
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-bg-dark: rgba(0, 0, 0, 0.5);
    
    --shadow-elegant: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
    --shadow-active: 0 5px 20px rgba(0, 0, 0, 0.2);
    
    --text-primary: #ffffff;
    --text-secondary: #b2bec3;
    --text-dark: #2d3436;
    
    --border-radius: 20px;
    --border-radius-small: 10px;
    --border-radius-large: 30px;
    
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
    
    --z-header: 100;
    --z-overlay: 1000;
    --z-modal: 2000;
    --z-notification: 3000;
    --z-loading: 4000;
}

/* Typography */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: #0f0f0f;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f0f 100%);
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

.animated-bg::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    animation: rotate 40s linear infinite reverse;
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    animation: float 10s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
    }
}

/* Header Styles */
.header {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    animation: slideDown 0.8s ease-out;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.back-btn,
.wishlist-btn,
.language-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-btn:hover,
.wishlist-btn:hover,
.language-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

/* Main Container */
.main-container {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Section Styles */
.category-section,
.camera-section,
.preview-section {
    width: 100%;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    text-align: center;
    margin-bottom: 10px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(255, 215, 0, 0.2);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 40px;
    font-weight: 300;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: -1;
}

.category-card:hover,
.category-card.active {
    transform: translateY(-10px) scale(1.05);
    border-color: transparent;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.category-card:hover::before,
.category-card.active::before {
    opacity: 1;
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform var(--transition-fast);
}

.category-card:hover .category-icon,
.category-card.active .category-icon {
    transform: scale(1.2) rotate(10deg);
    -webkit-text-fill-color: white;
}

.category-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.category-desc {
    font-size: 12px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.category-card:hover .category-desc,
.category-card.active .category-desc {
    color: rgba(255, 255, 255, 0.9);
}

/* Camera Section */
.camera-section {
    display: none;
}

.camera-section.active {
    display: block;
    animation: fadeInUp 0.8s ease;
}

.camera-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.video-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-large);
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
}

#videoElement {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* Camera Overlay */
.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Face Guide */
.face-guide {
    width: 300px;
    height: 400px;
    position: relative;
    display: none;
}

.face-guide.active {
    display: block;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.6;
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
    }
}

.face-outline {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-radius: 150px 150px 200px 200px / 200px 200px 250px 250px;
    position: relative;
}

.ear-point {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 215, 0, 0.8);
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.2);
    animation: pulse 1.5s ease-in-out infinite;
}

.ear-point.left {
    top: 45%;
    left: -15px;
}

.ear-point.right {
    top: 45%;
    right: -15px;
}

/* Hand Guide */
.hand-guide {
    width: 350px;
    height: 350px;
    display: none;
    position: relative;
}

.hand-guide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.hand-outline {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hand-outline::before {
    content: '✋';
    font-size: 150px;
    opacity: 0.3;
    filter: grayscale(1) brightness(2);
}

/* Wrist Guide */
.wrist-guide {
    width: 400px;
    height: 200px;
    display: none;
    position: relative;
}

.wrist-guide.active {
    display: block;
}

.wrist-outline {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-radius: 100px;
    position: relative;
}

/* Head Guide */
.head-guide {
    width: 350px;
    height: 250px;
    display: none;
    position: relative;
}

.head-guide.active {
    display: block;
}

.head-outline {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 215, 0, 0.6);
    border-radius: 50% 50% 0 0;
    border-bottom: none;
    position: relative;
}

.head-outline::after {
    content: '👑';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    opacity: 0.5;
}

.guide-text {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 215, 0, 0.8);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Control Buttons */
.camera-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.btn-capture {
    background: var(--gold-gradient);
    color: #1a1a2e;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.btn-capture:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

.btn-gold {
    background: var(--gold-gradient);
    color: #1a1a2e;
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn[disabled]:hover {
    transform: none;
}

/* Side Panel */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 25px;
    animation: slideInRight 0.8s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.product-info {
    text-align: center;
}

.product-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Workflow Steps */
.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.workflow-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    transition: var(--transition-fast);
}

.workflow-step.active {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.4);
}

.step-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.workflow-step.active .step-icon {
    background: var(--gold-gradient);
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.step-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.step-content p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Instructions */
.instructions-card {
    text-align: center;
}

.instruction-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.instruction-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 15px;
    transition: transform var(--transition-fast);
}

.instruction-item:hover {
    transform: scale(1.05);
}

.instruction-icon {
    font-size: 32px;
    color: rgba(255, 215, 0, 0.8);
    margin-bottom: 10px;
}

.instruction-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Preview Section */
.preview-section {
    display: none;
}

.preview-section.active {
    display: block;
    animation: fadeIn 0.8s ease;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.preview-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform var(--transition-fast);
}

.preview-item:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.preview-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.preview-label {
    padding: 15px;
    text-align: center;
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
}

/* Overlays and Modals Base Styles */
.capture-grid,
.whatsapp-section,
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: var(--z-overlay);
}

.capture-grid.active,
.whatsapp-section.active,
.loading-overlay.active {
    display: flex;
}

/* Responsive Design Base */
@media (max-width: 1024px) {
    .camera-container {
        grid-template-columns: 1fr;
    }
    
    .side-panel {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .back-btn,
    .wishlist-btn,
    .language-btn {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .camera-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .instruction-images {
        grid-template-col