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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0px;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

header p {
    color: #718096;
    font-size: 1rem;
}

/* QR Reader Styles */
.qr-reader {
    width: 100%;
    max-width: 350px;
    margin: 0 auto 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.qr-reader video {
    width: 100%;
    height: auto;
    display: block;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-back {
    position: absolute;
    left: 0;
    top: 0;
    background: #f7fafc;
    color: #4a5568;
    font-size: 0.9rem;
}

.btn-audio {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-audio:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

/* Controls */
.controls {
    text-align: center;
    margin: 20px 0;
}

/* Status and Results */
.status, .results {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    background: #f7fafc;
}

.results {
    background: #e6fffa;
    border: 1px solid #81e6d9;
}

/* Language Selector */
.language-selector {
    position: absolute;
    right: 0;
    top: 0;
}

.language-selector select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Info Styles */
.product-info {
    animation: fadeIn 0.5s ease-in;
}

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

.product-image {
    text-align: center;
    margin-bottom: 20px;
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-details h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.product-details p {
    color: #718096;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Price Section */
.price-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.original-price {
    font-size: 0.9rem;
    color: #a0aec0;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.discount-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#discount-rate {
    background: #fed7d7;
    color: #c53030;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

#final-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

/* Error Styles */
.error {
    text-align: center;
    padding: 40px 20px;
    color: #c53030;
}

.error h2 {
    margin-bottom: 15px;
}

/* Audio Controls */
.audio-controls {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .product-details h1 {
        font-size: 1.3rem;
    }
    
    #final-price {
        font-size: 1.3rem;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

