body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 950px;
    margin: 0 auto;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    /* Yakınlaştırmayı engelle */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: relative;
    overflow-x: hidden;
}

/* Arka plan animasyonu için */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(102, 126, 234, 0.3) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundFloat {
    0%, 100% { opacity: 0.8; transform: scale(1) rotate(0deg); }
    33% { opacity: 0.6; transform: scale(1.05) rotate(1deg); }
    66% { opacity: 0.7; transform: scale(0.95) rotate(-1deg); }
}

/* Tüm elementler için çift tıklama yakınlaştırmayı engelle */
* {
    touch-action: manipulation;
}

@media (max-width: 768px) {
    body {
        padding: 8px;
    }
}
.container {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 45px;
    border-radius: 25px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.15),
        0 10px 20px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.3);
    position: relative;
    animation: containerFadeIn 0.8s ease-out;
    transition: all 0.3s ease;
}

.container:hover {
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.2),
        0 15px 30px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

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

@media (max-width: 768px) {
    .container {
        padding: 25px;
        border-radius: 20px;
        margin: 8px;
    }
}
h1 {
    color: #2d3748;
    text-align: center;
    margin-bottom: 15px;
    font-size: 2.8em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
    animation: titleGlow 3s ease-in-out infinite alternate;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    border-radius: 2px;
    animation: underlineGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0% { filter: brightness(1) saturate(1); }
    100% { filter: brightness(1.1) saturate(1.2); }
}

@keyframes underlineGlow {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleX(1); }
    50% { opacity: 1; transform: translateX(-50%) scaleX(1.2); }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2em;
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.9em;
    }
}
.subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 45px;
    font-style: italic;
    font-size: 1.1em;
    font-weight: 400;
    opacity: 0.9;
    animation: subtitleFade 1s ease-out 0.3s both;
}

@keyframes subtitleFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .subtitle {
        margin-bottom: 30px;
        font-size: 1em;
    }
}
.form-group {
    margin-bottom: 30px;
    animation: formGroupSlide 0.6s ease-out;
}

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

label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #374151;
    font-size: 1.15em;
    letter-spacing: 0.025em;
}
.input-container {
    display: flex;
    align-items: stretch;
    gap: 12px;
    position: relative;
}

.input-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: xor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-container:focus-within::before {
    opacity: 1;
}

input[type="number"] {
    flex: 1;
    padding: 18px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}
.paste-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(6, 182, 212, 0.3),
        0 2px 4px rgba(6, 182, 212, 0.2);
    min-width: 130px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.paste-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
    z-index: -1;
}

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

.paste-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 20px rgba(6, 182, 212, 0.4),
        0 4px 8px rgba(6, 182, 212, 0.3);
}

.paste-btn:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s;
}

.paste-btn:disabled {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(156, 163, 175, 0.2);
}

@media (max-width: 768px) {
    input[type="number"] {
        padding: 15px 18px;
        font-size: 16px;
    }
    .paste-btn {
        padding: 15px 20px;
        font-size: 14px;
        min-width: 110px;
    }
    .input-container {
        gap: 10px;
    }
}
input[type="number"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 4px 12px rgba(102, 126, 234, 0.15);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

input[type="number"]::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 18px 45px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 16px rgba(102, 126, 234, 0.3),
        0 3px 6px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

button:hover::before {
    left: 100%;
}

@media (max-width: 768px) {
    button {
        padding: 15px 35px;
        font-size: 16px;
    }
}
button:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 
        0 10px 25px rgba(102, 126, 234, 0.4),
        0 6px 12px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(-1px) scale(0.99);
    transition: transform 0.1s;
}

button:disabled {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(156, 163, 175, 0.2);
}

button:disabled::before {
    display: none;
}
#result {
    margin-top: 35px;
    padding: 0;
    border-radius: 16px;
    display: none;
    animation: resultSlideIn 0.5s ease-out;
}

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

.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
    color: #065f46;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 
        0 10px 25px rgba(16, 185, 129, 0.15),
        0 4px 10px rgba(16, 185, 129, 0.1);
}
.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    color: #991b1b;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 
        0 10px 25px rgba(239, 68, 68, 0.15),
        0 4px 10px rgba(239, 68, 68, 0.1);
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.loading {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    border: 2px solid #0891b2;
    color: #0c4a6e;
    text-align: center;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 
        0 10px 25px rgba(8, 145, 178, 0.15),
        0 4px 10px rgba(8, 145, 178, 0.1);
}
.stock-info {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 
        0 12px 28px rgba(102, 126, 234, 0.15),
        0 6px 12px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.product-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e5e7eb;
    word-wrap: break-word;
    position: relative;
    animation: titleHighlight 0.8s ease-out;
}

.product-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    animation: titleLineGrow 0.8s ease-out 0.2s both;
}

@keyframes titleHighlight {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleLineGrow {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

.product-details {
    background: linear-gradient(135deg, #f8faff 0%, #e8f4fd 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 
        0 6px 16px rgba(102, 126, 234, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: detailsFadeIn 0.6s ease-out 0.3s both;
}

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

.product-detail {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.product-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}

.product-detail:hover::before {
    left: 100%;
}

.product-detail.discount {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    font-weight: 600;
    border: none;
    animation: discountPulse 2s infinite;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

@keyframes discountPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4); }
}

@media (max-width: 768px) {
    .product-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .product-detail {
        text-align: center;
        font-size: 0.85em;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.1em;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
}
.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

@media (max-width: 768px) {
    .stock-item {
        padding: 12px 0;
        /* flex-direction her zaman row olarak kalacak */
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 50px; /* Minimum yükseklik garanti et */
    }
    
    .stock-item.priority {
        /* Priority itemlar için column */
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .stock-item {
        padding: 10px 0;
        /* Mobilde de her zaman row olarak kal */
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 45px; /* Minimum yükseklik garanti et */
    }
    
    .stock-item.priority {
        /* Priority itemlar için column */
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px;
    }
}
.stock-item:hover {
    background-color: #f8f9fa;
}
.stock-item:last-child {
    border-bottom: none;
}
.stock-item.priority {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #667eea;
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}
.stock-item.priority.no-stock {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border: 2px solid #f44336;
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.2);
}
.store-name {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .store-name {
        font-size: 0.95em;
        flex: 1;
        text-align: left;
        /* Uzun isimleri kır */
        word-wrap: break-word;
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
        max-width: 70%; /* Stok adetine yer bırak */
    }
    
    .store-name.priority {
        font-size: 1.1em;
        max-width: none; /* Priority için limit yok */
    }
}

@media (max-width: 480px) {
    .store-name {
        font-size: 0.9em;
        flex: 1;
        text-align: left;
        /* Uzun isimleri kır */
        word-wrap: break-word;
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        hyphens: auto;
        max-width: 65%; /* Stok adetine daha fazla yer bırak */
    }
    
    .store-name.priority {
        font-size: 1em;
        text-align: center;
        max-width: none; /* Priority için limit yok */
    }
}
.store-name.priority {
    color: #667eea;
    font-size: 1.2em;
    font-weight: 900;
}
.store-name.priority.no-stock {
    color: #f44336;
}
.stock-count {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
    background-color: #f8f9ff;
    padding: 5px 15px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .stock-count {
        font-size: 16px;
        padding: 6px 12px;
        min-width: 50px;
        text-align: center;
        flex-shrink: 0; /* Küçülmeye izin verme */
    }
}

@media (max-width: 480px) {
    .stock-count {
        font-size: 15px;
        padding: 5px 10px;
        min-width: 45px;
        text-align: center;
        flex-shrink: 0; /* Küçülmeye izin verme */
    }
}
.stock-count.priority {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 22px;
    padding: 8px 20px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}
.stock-count.priority.no-stock {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

@media (max-width: 768px) {
    .stock-count.priority {
        font-size: 20px;
        padding: 6px 16px;
    }
    .stock-count.priority.no-stock {
        font-size: 20px;
        padding: 6px 16px;
    }
}
.debug-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    word-break: break-all;
}

@media (max-width: 768px) {
    .debug-info {
        padding: 10px;
        font-size: 10px;
        max-height: 200px;
    }
}
.spinner {
    width: 50px;
    height: 50px;
    margin: 25px auto;
    position: relative;
}

.spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: modernSpin 1s linear infinite;
}

.spinner::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border: 2px solid rgba(118, 75, 162, 0.3);
    border-top: 2px solid #764ba2;
    border-radius: 50%;
    animation: modernSpin 0.8s linear infinite reverse;
}

@keyframes modernSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.powered-by {
    text-align: center;
    margin-top: 40px;
    color: rgba(107, 114, 128, 0.8);
    font-size: 0.95em;
    font-weight: 500;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: poweredByGlow 4s ease-in-out infinite;
}

@keyframes poweredByGlow {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
        transform: translateY(0);
    }
    50% { 
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
        transform: translateY(-1px);
    }
}

/* Barkod okuyucu stilleri */
.barcode-scanner {
    margin-bottom: 30px;
    text-align: center;
    animation: scannerFadeIn 0.8s ease-out 0.5s both;
}

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

.scanner-toggle {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 16px rgba(16, 185, 129, 0.3),
        0 3px 6px rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.scanner-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.6s;
}

.scanner-toggle:hover::before {
    left: 100%;
}

.scanner-toggle:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 25px rgba(16, 185, 129, 0.4),
        0 6px 12px rgba(16, 185, 129, 0.3);
}

.scanner-toggle:active {
    transform: translateY(-1px) scale(0.98);
    transition: transform 0.1s;
}

.scanner-toggle.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    box-shadow: 
        0 6px 16px rgba(239, 68, 68, 0.3),
        0 3px 6px rgba(239, 68, 68, 0.2);
}

.scanner-toggle.active:hover {
    box-shadow: 
        0 10px 25px rgba(239, 68, 68, 0.4),
        0 6px 12px rgba(239, 68, 68, 0.3);
}

#barcode-scanner {
    display: none;
    margin: 25px auto;
    border: 3px solid #667eea;
    border-radius: 20px;
    overflow: hidden;
    max-width: 100%;
    position: relative;
    box-shadow: 
        0 12px 32px rgba(102, 126, 234, 0.3),
        0 6px 16px rgba(102, 126, 234, 0.2);
    background: #000;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

#barcode-scanner.scanning {
    animation: scannerActivePulse 2s ease-in-out infinite;
}

@keyframes scannerActivePulse {
    0%, 100% { 
        box-shadow: 
            0 12px 32px rgba(102, 126, 234, 0.3),
            0 6px 16px rgba(102, 126, 234, 0.2);
        border-color: #667eea;
    }
    50% { 
        box-shadow: 
            0 16px 40px rgba(102, 126, 234, 0.5),
            0 8px 20px rgba(102, 126, 234, 0.3),
            0 0 30px rgba(102, 126, 234, 0.4);
        border-color: #764ba2;
    }
}

#barcode-scanner video {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    background: #000;
}

#barcode-scanner canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 200px;
    border: 3px solid #667eea;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.7);
}

.scanner-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #fff;
}

.scanner-corner.top-left {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}

.scanner-corner.top-right {
    top: -3px;
    right: -3px;
    border-left: none;
    border-bottom: none;
}

.scanner-corner.bottom-left {
    bottom: -3px;
    left: -3px;
    border-right: none;
    border-top: none;
}

.scanner-corner.bottom-right {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

.scanner-line {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fff, #667eea, #fff, transparent);
    animation: scanLine 2s ease-in-out infinite;
}

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

.scanner-result {
    margin-top: 25px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    color: #065f46;
    display: none;
    font-weight: 600;
    box-shadow: 
        0 8px 20px rgba(16, 185, 129, 0.2),
        0 4px 10px rgba(16, 185, 129, 0.1);
    animation: scannerResultSlide 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.scanner-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: scannerShine 2s ease-out;
}

@keyframes scannerShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.scanner-result.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-color: #ef4444;
    color: #991b1b;
    box-shadow: 
        0 8px 20px rgba(239, 68, 68, 0.2),
        0 4px 10px rgba(239, 68, 68, 0.1);
}

@keyframes scannerResultSlide {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Varyant seçici stilleri */
.variant-selector {
    background-color: #f0f8ff;
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.variant-selector h4 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.variant-selector h4::before {
    content: "🎨";
    font-size: 1.2em;
}

.variant-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.color-group {
    background: white;
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.1);
}

.color-group-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 12px;
    text-align: center;
    padding: 8px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    border-radius: 8px;
    border: 1px solid #e3f2fd;
}

.size-buttons-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.variant-button {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border: 2px solid #007bff;
    color: #007bff;
    padding: 12px 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.variant-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,123,255,0.1), transparent);
    transition: left 0.5s;
}

.variant-button:hover::before {
    left: 100%;
}

.variant-button:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.variant-button.selected {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

.variant-size {
    font-size: 16px;
    font-weight: bold;
}

.variant-barcode {
    font-size: 10px;
    opacity: 0.8;
    font-family: monospace;
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.variant-button:hover .variant-barcode {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .size-buttons-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .variant-button {
        padding: 10px 6px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .variant-size {
        font-size: 14px;
    }
    
    .variant-barcode {
        font-size: 9px;
        padding: 1px 4px;
    }
}

@media (max-width: 480px) {
    .size-buttons-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    .variant-button {
        padding: 8px 4px;
        font-size: 12px;
        min-height: 35px;
    }
    
    .variant-size {
        font-size: 13px;
    }
    
    .variant-barcode {
        font-size: 8px;
    }
    
    .color-group-title {
        font-size: 1em;
        padding: 6px;
    }
}

.size-button.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.size-check-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.size-check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.size-check-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.size-result {
    margin-top: 15px;
    padding: 15px;
    border-radius: 10px;
    display: none;
    animation: slideInUp 0.5s ease;
}

.size-result.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    color: #155724;
}

.size-result.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    color: #721c24;
}

.size-result.loading {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 2px solid #17a2b8;
    color: #0c5460;
    text-align: center;
}

@media (max-width: 768px) {
    .size-grid {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 8px;
    }
    
    .size-button {
        padding: 10px 6px;
        font-size: 12px;
        min-height: 40px;
    }
    
    .size-title {
        font-size: 1.1em;
    }
    
    .size-check-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

.scanner-status {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(102, 126, 234, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

.scanner-status.ready {
    background: rgba(16, 185, 129, 0.95);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: statusReady 1s ease-out;
}

@keyframes statusReady {
    0% {
        transform: translateX(-50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateX(-50%) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.95;
    }
}

@media (max-width: 768px) {
    .scanner-toggle {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    #barcode-scanner video {
        height: 300px;
    }
    
    .scanner-frame {
        width: 300px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .scanner-frame {
        width: 240px;
        height: 140px;
    }
    
    #barcode-scanner video {
        height: 270px;
    }
    
    .scanner-toggle {
        padding: 12px 24px;
        font-size: 14px;
    }
}