/* Enhanced Virtual Try-On Styles */
/* Add these styles to the main template */

/* Ripple Effect */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 9999;
    animation: confetti-fall linear;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Glow Effect */
.glow-effect {
    animation: glow 1s ease-in-out;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8); }
}

/* Zoom Control */
.zoom-control {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.zoom-control button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zoom-control button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.zoom-level {
    color: white;
    font-size: 14px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.tutorial-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tutorial-box h3 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.tutorial-box p {
    color: #636e72;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.tutorial-btn {
    background: var(--gold-gradient);
    color: #1a1a2e;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tutorial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.tutorial-skip {
    background: none;
    border: none;
    color: #636e72;
    font-size: 14px;
    margin-top: 15px;
    cursor: pointer;
    text-decoration: underline;
}

/* Main Progress Bar */
.main-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.progress-fill {
    height: 100%;
    background: var(--gold-gradient);
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 20px;
    height: 100%;
    background: white;
    filter: blur(10px);
    animation: progress-glow 1s ease-in-out infinite;
}

@keyframes progress-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.progress-text {
    position: fixed;
    top: 10px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.main-progress-bar.complete {
    animation: progress-complete 0.5s ease forwards;
}

@keyframes progress-complete {
    to {
        opacity: 0;
        transform: scaleY(3);
    }
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 5000;
}

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

.achievement-content h4 {
    font-size: 16px;
    color: #1a1a2e;
    margin: 0 0 5px 0;
}

.achievement-content p {
    font-size: 14px;
    color: #636e72;
    margin: 0;
}

/* Notification System */
.notification {
    position: fixed;
    top: 120px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: 4000;
    max-width: 300px;
}

.notification i {
    font-size: 20px;
}

.notification-info i {
    color: #74b9ff;
}

.notification-success i {
    color: #00b894;
}

.notification-warning i {
    color: #fdcb6e;
}

.notification-error i {
    color: #d63031;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    /* Mobile Navigation */
    .header-content {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .back-btn {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    /* Category Cards Mobile */
    .category-section {
        padding: 20px 15px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-card {
        padding: 20px 15px;
    }
    
    .category-icon {
        font-size: 36px;
    }
    
    .category-name {
        font-size: 14px;
    }
    
    .category-desc {
        font-size: 11px;
    }
    
    /* Camera Section Mobile */
    .camera-container {
        grid-template-columns: 1fr;
    }
    
    .video-wrapper {
        padding: 15px;
    }
    
    .camera-controls {
        margin-top: 20px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    /* Side Panel Mobile */
    .side-panel {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }
    
    .info-card {
        padding: 20px;
    }
    
    /* WhatsApp Section Mobile */
    .whatsapp-card {
        padding: 30px 20px;
        width: 95%;
    }
    
    .whatsapp-icon {
        font-size: 60px;
    }
    
    .phone-input input {
        font-size: 20px;
        padding: 15px;
    }
    
    .numpad {
        gap: 10px;
        max-width: 280px;
    }
    
    .numpad-btn {
        padding: 20px;
        font-size: 20px;
    }
    
    /* Capture Overlay Mobile */
    .capture-countdown {
        font-size: 80px;
    }
    
    .pose-icon {
        font-size: 60px;
    }
    
    .pose-text {
        font-size: 20px;
    }
    
    /* Preview Grid Mobile */
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .preview-image {
        height: 200px;
    }
    
    /* Zoom Control Mobile */
    .zoom-control {
        bottom: 10px;
        right: 10px;
        padding: 8px;
    }
    
    .zoom-control button {
        width: 35px;
        height: 35px;
    }
    
    /* Tutorial Mobile */
    .tutorial-box {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .tutorial-box h3 {
        font-size: 24px;
    }
    
    .tutorial-box p {
        font-size: 14px;
    }
    
    /* Notifications Mobile */
    .notification,
    .achievement-popup {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Ultra Small Devices */
@media (max-width: 360px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .numpad {
        max-width: 240px;
    }
    
    .numpad-btn {
        padding: 15px;
        font-size: 18px;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .camera-container {
        grid-template-columns: 1.5fr 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .side-panel {
        grid-template-columns: 1fr;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .category-card:hover,
    .btn:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .btn,
    .numpad-btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Disable hover sounds on touch */
    .category-card:hover,
    .btn:hover {
        /* Hover sounds disabled via JS for touch devices */
    }
}

/* Landscape Mobile */
@media (max-width: 812px) and (orientation: landscape) {
    .main-container {
        padding-top: 80px;
    }
    
    .video-container {
        padding-bottom: 56.25%; /* 16:9 for landscape */
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .camera-container {
        grid-template-columns: 1.5fr 1fr;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders and shadows for retina displays */
    .category-card,
    .info-card,
    .whatsapp-card {
        border: 0.5px solid rgba(255, 255, 255, 0.2);
    }
    
    .btn {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }
}

/* Print Styles */
@media print {
    .header,
    .camera-controls,
    .side-panel,
    .loading-overlay,
    .capture-grid,
    .whatsapp-section {
        display: none !important;
    }
    
    .preview-section {
        display: block !important;
    }
    
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}