/* TV Shop - Apple-inspired Modern Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --border: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    gap: 0;
}

/* Lewa strona: Avatar */
.avatar-section {
    flex: 1;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Prawa strona: Panel zamówienia */
.order-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 60px 80px;
    background: var(--bg-primary);
    overflow-y: auto;
    position: relative;
}

.order-header {
    text-align: center;
    margin-bottom: 60px;
}

.order-header h1 {
    font-size: 64px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.order-header .subtitle {
    font-size: 28px;
    color: var(--text-secondary);
    font-weight: 400;
}

.order-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Lista zamówienia */
.order-list {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.5s ease-out;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    font-size: 32px;
}

.order-item:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.item-qty {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Status rozmowy */
.conversation-status {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

.status-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    font-size: 28px;
    line-height: 1.6;
    color: var(--text-primary);
    text-align: center;
}

.status-box.listening {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #4caf50;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
}

.status-box.talking {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #8b5cf6;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.002);
    }
}

/* Przyciski */
.action-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Pulsująca ikona głosowa - fale dźwiękowe */
.voice-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.25);
    outline: none;
}

.voice-button::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.25;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.voice-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.15;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite 0.6s;
}

.voice-waves {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
}

.wave {
    width: 3px;
    background: white;
    border-radius: 2px;
    animation: wave-animation 1.2s ease-in-out infinite;
}

.wave-1 {
    height: 12px;
    animation-delay: 0s;
}

.wave-2 {
    height: 20px;
    animation-delay: 0.2s;
}

.wave-3 {
    height: 16px;
    animation-delay: 0.4s;
}

@keyframes wave-animation {
    0%, 100% {
        transform: scaleY(0.5);
        opacity: 0.7;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.25;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.voice-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 113, 227, 0.35);
}

.voice-button:active {
    transform: scale(0.95);
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--accent);
    color: white;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--text-secondary);
}

.btn-success {
    background: #34c759;
}

/* Przycisk głosowy na dole */
.voice-button-container {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.voice-button-container .voice-button {
    width: 60px;
    height: 60px;
}

.voice-button-container .voice-waves {
    width: 24px;
    height: 24px;
}

.voice-button-container .wave {
    width: 2px;
}

.voice-button-container .wave-1 {
    height: 8px;
}

.voice-button-container .wave-2 {
    height: 14px;
}

.voice-button-container .wave-3 {
    height: 10px;
}

/* Mrugający przycisk podczas nasłuchiwania */
.voice-button.listening-active {
    animation: listening-pulse 1.5s ease-in-out infinite;
}

@keyframes listening-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(0, 113, 227, 0.25);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
        box-shadow: 0 6px 24px rgba(0, 113, 227, 0.4);
    }
}

/* Shop Selection */
.shop-selection {
    text-align: center;
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

.shop-selection h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.shop-logos {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.shop-logo {
    width: 180px;
    height: 180px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.shop-logo:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Promotion View */
.promotion-view {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

.promotion-view h2 {
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-primary);
}

.promotion-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-content: center;
}

.promotion-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.promotion-item:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-md);
}

.promotion-item .product-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.promotion-item .product-price {
    font-size: 24px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 10px;
}

.promotion-item .product-tag {
    background: #ff3b30;
    color: white;
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Promotion Product (nowy styl z obrazkami) */
.promotion-product {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.promotion-product:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.promotion-product .product-image {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.promotion-product .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.promotion-product .product-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.promotion-product .product-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.promotion-product .price-original {
    font-size: 20px;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.promotion-product .price-promo {
    font-size: 28px;
    color: var(--accent);
    font-weight: 700;
}

.promotion-product .promo-badge {
    background: #ff3b30;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 8px;
}

/* Delivery Choice */
.delivery-choice {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

.delivery-choice h2 {
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-primary);
}

.delivery-options {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.delivery-option {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    width: 350px;
    cursor: pointer;
}

.delivery-option:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.delivery-option .delivery-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.delivery-option h3 {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.delivery-option p {
    font-size: 22px;
    color: var(--text-secondary);
}

.courier-logos {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.courier-logo {
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* QR Section - Payment Status */
.qr-section .payment-status {
    font-size: 32px;
    font-weight: 600;
    margin-top: 30px;
    color: var(--text-primary);
    animation: fadeIn 0.5s ease-out;
}

.qr-section .payment-status.paid {
    color: #34C759;
}

/* Blinking QR Code */
.qr-section.blinking #qrCode {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0.2; }
}

/* Store Selection */
.store-selection {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

.store-selection h2 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-primary);
}

.store-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.store-btn {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    font-size: 28px;
    font-weight: 500;
    color: var(--text-primary);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.store-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

/* Summary */
.summary {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

.summary h2 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-primary);
}

.summary-content {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.summary-total {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
}

/* QR Section */
.qr-section {
    text-align: center;
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

.qr-section h2 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-primary);
}

#qrCode {
    margin: 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrCode canvas {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.order-info {
    font-size: 24px;
    color: var(--text-secondary);
    margin-top: 30px;
}

.sms-notification {
    font-size: 22px;
    color: #34c759;
    margin-top: 20px;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-list,
.status-box,
.store-selection,
.summary,
.qr-section,
.shop-selection,
.promotion-view,
.delivery-choice {
    animation: fadeIn 0.5s ease-out;
}

/* Flow sukienek - Style */

/* Brand Selection */
.brand-selection {
    text-align: center;
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
}

.brand-selection h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.brand-logos {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.brand-logo {
    width: 200px;
    height: 200px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.brand-logo:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Dress Gallery - 3D Slider */
.dress-gallery {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
    min-height: 700px;
    padding: 40px 0;
    overflow: hidden;
    position: relative;
}

.dress-gallery h2 {
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-primary);
}

.dress-slider-container {
    position: relative;
    width: 100%;
    height: 700px;
    perspective: 2500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dress-slider {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dress-slide {
    position: absolute;
    width: 350px;
    height: 550px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-secondary);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
    cursor: pointer;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.dress-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

/* Dress Detail - z nakładką */
.dress-detail {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
    position: relative;
}

.dress-image-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.dress-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.dress-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    padding: 40px;
    color: white;
}

.dress-name {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.dress-description {
    font-size: 24px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.dress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.dress-price {
    font-size: 42px;
    font-weight: 700;
    color: white;
}

.dress-sizes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dress-size {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 500;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.dress-size:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Try On Instructions */
.try-on-instructions {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
    text-align: center;
}

.instructions-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 60px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    max-width: 700px;
    margin: 0 auto;
}

.phone-icon {
    font-size: 80px;
    margin-bottom: 30px;
}

.instructions-content h2 {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.instructions-content p {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Pre-Scan Video */
.pre-scan {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.pre-scan-video {
    width: 100%;
    max-width: 800px;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

/* Scanning Effect */
.scanning-effect {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.scanning-animation {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #00ff00, transparent);
    animation: scan-line 2s linear infinite;
    box-shadow: 0 0 20px #00ff00;
}

.scan-text {
    font-size: 48px;
    font-weight: 600;
    color: #00ff00;
    text-shadow: 0 0 20px #00ff00;
    animation: pulse-glow 1.5s ease-in-out infinite;
    z-index: 1;
}

@keyframes scan-line {
    0% {
        top: 0;
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

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

/* Dress Result */
.dress-result {
    margin-top: 40px;
    animation: fadeIn 0.5s ease-out;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.dress-result-video {
    width: 100%;
    max-width: 800px;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}
