@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #e63946;
    --secondary: #1d3557;
    --accent: #f1faee;
    --glass: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
}

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

body {
    font-family: 'Outfit', sans-serif;
    height: 100vh;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    background: #f8f9fa url('../img/bg-cek-harga.jpeg') no-repeat left center;
    background-size: cover;
    padding-right: 40px;
}

body::before {
    display: none;
}

.container {
    position: relative;
    z-index: 2;
    width: 30%;
    min-width: 420px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 40px;
    padding: 60px 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
    animation: fadeIn 1s ease-out;
    transition: transform 0.5s ease;
}

body.keyboard-active .container {
    transform: translateY(-20%);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    margin-bottom: 40px;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%;
    background: white;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.title {
    color: var(--secondary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    color: #555;
    font-size: 1rem;
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    margin-bottom: 40px;
}

.search-box input {
    width: 100%;
    padding: 20px 70px 20px 30px;
    border-radius: 50px;
    border: 2px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    color: var(--secondary);
    font-weight: 600;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.3);
    transform: scale(1.02);
}

.result-card {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: left;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.item-name {
    font-size: 1.8rem;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 5px;
}

.item-code {
    font-size: 0.9rem;
    color: #888;
    letter-spacing: 2px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary);
}

.price-value {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
}

.error-message {
    display: none;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin-top: 10px;
    margin-bottom: 25px;
    font-weight: 600;
    border: 1px solid rgba(255, 77, 77, 0.2);
}

.footer-text {
    margin-top: 30px;
    color: #888;
    font-size: 0.8rem;
}

.scanner-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 30px;
    color: #666;
}

.pulse {
    width: 10px;
    height: 10px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.search-actions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    z-index: 5;
}

.btn-keyboard {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: var(--secondary);
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-keyboard:hover, .btn-keyboard.active {
    background: var(--primary);
    color: white;
}

.keyboard-wrapper {
    display: none;
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    gap: 10px;
    padding: 25px 10%;
    background: rgba(230, 57, 70, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.keyboard-wrapper.active {
    display: flex;
    bottom: 0;
}

/* Removed sidebar and main styles as they are now simplified */
.keyboard-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Removed keyboard-header */

/* Removed btn-close-keyboard style */

.btn-close-keyboard:hover {
    background: white;
    color: #c1121f;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.key {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 10px;
    min-width: 60px;
    height: 55px;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.key:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.key:active {
    transform: translateY(0);
}

.key.wide {
    min-width: 120px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
}

.key.space-key {
    width: 60%;
    margin: 10px auto 0;
    min-width: unset;
    background: rgba(255, 255, 255, 0.9);
}

.key.active {
    background: var(--secondary);
    color: white;
}



@media (max-width: 1200px) {
    .container {
        width: 90%;
        min-width: unset;
        padding: 30px 20px;
    }
    
    body {
        justify-content: center;
        padding-right: 0;
    }
    
    .key {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
        padding: 10px;
    }
    
    .key.extra-wide {
        min-width: 200px;
    }
}