:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --glow-color: rgba(37, 99, 235, 0.3);
    
    /* Durum Renkleri */
    --status-sold-bg: rgba(239, 68, 68, 0.15);
    --status-sold-text: #ef4444;
    --status-stock-bg: rgba(16, 185, 129, 0.15);
    --status-stock-text: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

#app {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #60a5fa, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.install-badge {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
}

/* Common Views */
.view {
    flex: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}
.hidden { display: none !important; }

/* Buttons */
.button-grid { display: grid; gap: 20px; margin-top: 20px; }
.action-btn {
    background: var(--card-bg); border: 1px solid var(--border-color);
    padding: 24px; border-radius: 20px; color: white;
    text-align: left; display: flex; align-items: center; gap: 20px;
    cursor: pointer; transition: all 0.2s;
}
.action-btn.primary {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border: none; box-shadow: 0 10px 25px -5px var(--glow-color);
}
.btn-icon {
    font-size: 2.2rem; width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.1); border-radius: 16px;
}
.btn-text h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 4px; }
.btn-text p { font-size: 0.9rem; color: var(--text-muted); }
.action-btn.primary .btn-text p { color: rgba(255, 255, 255, 0.7); }

/* Top Navigation (Back) */
.view-header {
    display: flex; align-items: center; gap: 15px; margin-bottom: 15px;
}
.back-btn {
    background: var(--card-bg); border: 1px solid var(--border-color); color: white;
    width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* Scanner */
#reader-wrapper {
    width: 100%; border-radius: 24px; overflow: hidden;
    background: black; border: 2px solid var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color); aspect-ratio: 1;
}

/* Dynamic Results Layout */
/* Product Info Header (New Big Layout) */
.product-info-header {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}
.large-img-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.large-img-container img { width: 100%; height: 100%; object-fit: contain; }
.main-info {
    padding: 20px;
    text-align: center;
}
.main-info h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; color: var(--text-color); }
.main-info p { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.rc-dbs {
    background: rgba(255,255,255,0.05);
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.rc-dbs span {
    background: var(--border-color);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.rc-body {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rc-left { flex: 1; min-width: 0; }
.rc-right { text-align: right; }

.rc-title-row { font-size: 0.95rem; font-weight: 600; color: var(--text-color); margin-bottom: 4px; }
.rc-sub-row { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

.rc-details-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.rc-detail-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}
.rc-detail-badge strong {
    color: var(--text-color);
    font-weight: 600;
}

.rc-price-row { font-size: 1.1rem; font-weight: 800; color: white; }
.rc-cost-row { font-size: 0.75rem; color: var(--text-muted); }

/* Status Styles (Compact) */
.rc-status {
    margin: 0 16px 12px 16px; padding: 8px 12px;
    border-radius: 10px; font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rc-status.in-stock {
    background: var(--status-stock-bg); color: var(--status-stock-text);
}
.rc-status.sold {
    background: var(--status-sold-bg); color: var(--status-sold-text);
}
.rc-status strong { display: block; font-size: 0.95rem; }

/* General UI Controls */
.secondary-btn {
    background: var(--card-bg); border: 1px solid var(--border-color);
    color: white; padding: 18px; border-radius: 16px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    width: 100%; margin-top: auto;
}

/* Modals & Toasts */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-content {
    background: var(--card-bg); padding: 25px; border-radius: 24px;
    width: 100%; max-width: 400px;
}
.modal-content input {
    width: 100%; background: var(--bg-color); border: 1px solid var(--border-color);
    color: white; padding: 16px; border-radius: 12px; margin: 20px 0; font-size: 1.1rem;
}
.modal-actions { display: flex; gap: 15px; }
.modal-actions button { flex: 1; padding: 14px; border-radius: 12px; font-weight: 600; border:none; cursor:pointer;}
.modal-actions .primary { background: var(--primary-color); color: white; }

.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: #334155; color: white; padding: 14px 28px; border-radius: 50px;
    z-index: 2000; box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

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

.highlight-blink {
    color: #f97316;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
    animation: blink-orange 0.8s infinite alternate;
}

@keyframes blink-orange {
    from { opacity: 1; }
    to { opacity: 0.4; }
}
