:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --primary-color: #667eea;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body.dark-mode {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 50px;
    height: 50px;
    top: 30%;
    left: 70%;
    animation-delay: 6s;
}

.particle:nth-child(5) {
    width: 70px;
    height: 70px;
    top: 50%;
    left: 50%;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) translateX(30px) rotate(90deg);
    }
    50% {
        transform: translateY(-60px) translateX(-30px) rotate(180deg);
    }
    75% {
        transform: translateY(-30px) translateX(-60px) rotate(270deg);
    }
}

.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-color);
    border: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

.theme-toggle .material-icons {
    font-size: 24px;
    color: var(--text-primary);
}

.hero-header {
    background: var(--primary-gradient);
    background-size: 200% 200%;
    animation: gradientFlow 3s ease infinite;
    padding: 80px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease;
}

.logo-container {
    display: inline-block;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

.app-title {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.app-tagline {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
    animation: fadeInUp 0.8s ease 0.4s both;
}

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

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

.main-container {
    max-width: 1200px;
    margin: -40px auto 0;
    padding: 0 24px 80px;
    position: relative;
    z-index: 1;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 32px;
    margin-bottom: 32px;
    animation: scaleIn 0.6s ease;
}

body.dark-mode .glass-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.card-header i {
    font-size: 28px;
    color: var(--primary-color);
}

.card-header h2 {
    font-size: 28px;
    flex: 1;
}

.scanner-actions {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.divider {
    position: relative;
    text-align: center;
    margin: 16px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-secondary), transparent);
}

.divider span {
    position: relative;
    background: var(--surface-color);
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

body.dark-mode .divider span {
    background: var(--surface-color);
}

.manual-input {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.input-group {
    flex: 1;
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 16px 48px 16px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -8px;
    left: 12px;
    font-size: 12px;
    background: var(--surface-color);
    padding: 0 4px;
    color: var(--primary-color);
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.scan-tips {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.scan-tips h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.scan-tips ul {
    list-style: none;
    display: grid;
    gap: 12px;
}

.scan-tips li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-primary);
}

.scan-tips li i {
    color: var(--success-color);
    font-size: 16px;
}

.example-barcodes {
    margin-top: 24px;
}

.example-barcodes h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.example-barcodes h4 i {
    color: var(--warning-color);
}

.barcode-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--surface-color);
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chip:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.chip i {
    font-size: 16px;
}

.camera-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 9999;
    display: none;
    flex-direction: column;
}

.camera-view.active {
    display: flex;
}

#barcode-scanner {
    width: 100%;
    height: 100%;
    position: relative;
}

#barcode-scanner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#barcode-scanner canvas {
    position: absolute;
    top: 0;
    left: 0;
}

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

.scan-frame {
    position: relative;
    width: 300px;
    height: 200px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-md);
}

.corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
}

.corner-tl {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: var(--radius-md);
}

.corner-tr {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: var(--radius-md);
}

.corner-bl {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: var(--radius-md);
}

.corner-br {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: var(--radius-md);
}

.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    animation: scanLine 2s linear infinite;
}

@keyframes scanLine {
    0% { top: 0%; }
    100% { top: 100%; }
}

.scan-instruction {
    position: absolute;
    bottom: 80px;
    text-align: center;
    color: #ffffff;
}

.scan-instruction i {
    font-size: 48px;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

.scan-instruction p {
    font-size: 16px;
    font-weight: 500;
}

.camera-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    pointer-events: all;
}

.btn-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.btn-stop {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-stop:hover {
    background: #dc2626;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.product-section {
    margin-top: 32px;
}

.loading-state {
    text-align: center;
    padding: 80px 24px;
    display: none;
}

.loading-state.active {
    display: block;
}

.loading-state p {
    margin-top: 24px;
    font-size: 18px;
    color: var(--text-secondary);
}

.product-content {
    display: none;
}

.product-content.active {
    display: block;
    animation: fadeInUp 0.6s ease;
}

.product-card {
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    margin-bottom: 24px;
}

.product-header {
    position: relative;
    padding: 32px;
    background: var(--primary-gradient);
    color: #ffffff;
}

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

.product-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.6s ease;
}

.product-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
}

.nutri-score-badge {
    position: absolute;
    top: 32px;
    right: 32px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.nutri-score-a { background: #10b981; }
.nutri-score-b { background: #84cc16; }
.nutri-score-c { background: #f59e0b; }
.nutri-score-d { background: #f97316; }
.nutri-score-e { background: #ef4444; }

.product-body {
    padding: 32px;
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 32px;
}

.health-indicator i {
    font-size: 36px;
}

.health-indicator-content h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.health-indicator-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.fact-card {
    text-align: center;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.fact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.fact-card i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.fact-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fact-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.section-title i {
    color: var(--primary-color);
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.nutrient-card {
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.nutrient-card:hover {
    border-color: var(--primary-color);
}

.nutrient-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.nutrient-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.nutrient-value {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}

.nutrient-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.nutrient-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    animation: fillBar 1s ease;
}

@keyframes fillBar {
    from { width: 0; }
}

.ingredients-section {
    margin: 32px 0;
}

.ingredients-text {
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    line-height: 1.8;
    font-size: 15px;
}

.allergen-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.allergen-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--danger-color);
    color: #ffffff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInRight 0.5s ease;
}

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

.allergen-tag:nth-child(1) { animation-delay: 0.1s; }
.allergen-tag:nth-child(2) { animation-delay: 0.2s; }
.allergen-tag:nth-child(3) { animation-delay: 0.3s; }
.allergen-tag:nth-child(4) { animation-delay: 0.4s; }

.additives-warning {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--danger-color);
    margin: 24px 0;
}

.additives-warning i {
    font-size: 32px;
    color: var(--danger-color);
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.category-chip {
    padding: 6px 14px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 2px solid var(--primary-color);
    background: var(--surface-color);
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.history-section {
    margin-top: 48px;
}

.history-list {
    display: grid;
    gap: 16px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease;
}

.history-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.history-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.history-info {
    flex: 1;
}

.history-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.history-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.history-score {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #ffffff;
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state p {
    margin-top: 16px;
    font-size: 18px;
    color: var(--text-primary);
}

.empty-state small {
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--danger-color);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.btn-text:hover {
    background: rgba(239, 68, 68, 0.1);
}

.footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: rgba(255,255,255,0.8);
    padding: 60px 24px 32px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: #ffffff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: #ffffff;
    transform: translateX(4px);
}

.author-name {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.author-role {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.license {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 8px;
}

.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    font-size: 24px;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
}

.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-200%);
    background: var(--surface-color);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast i {
    font-size: 24px;
    color: var(--success-color);
}

@media (max-width: 768px) {
    .app-title {
        font-size: 36px;
    }
    
    .app-tagline {
        font-size: 16px;
    }
    
    .main-container {
        padding: 0 16px 60px;
    }
    
    .glass-card {
        padding: 24px;
    }
    
    .manual-input {
        flex-direction: column;
    }
    
    .quick-facts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nutrition-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .nutri-score-badge {
        width: 60px;
        height: 60px;
        font-size: 36px;
        top: 16px;
        right: 16px;
    }
    
    .product-name {
        font-size: 24px;
    }
    
    .scan-frame {
        width: 280px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
    
    .hero-header {
        padding: 60px 16px 40px;
    }
    
    .product-header {
        padding: 24px 16px;
    }
    
    .product-body {
        padding: 24px 16px;
    }
    
    .fab {
        width: 56px;
        height: 56px;
        bottom: 24px;
        right: 24px;
        font-size: 20px;
    }
}
