/* Small Desktop */
@media screen and (max-width: 1200px) {
    .vending-machine {
        width: 95%;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        min-height: 90vh;
        gap: 1rem;
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .perfume-display {
        width: 100%;
        height: 520px;
        position: relative;
        padding: 1rem 0;
        overflow: hidden;
    }

    .perfume-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding: 1rem 2rem;
        margin: 0 -1rem;
        position: relative;
        width: 100%;
        min-height: 480px;
    }

    /* Custom scrollbar styling */
    .perfume-row::-webkit-scrollbar {
        height: 8px;
        display: block;
    }

    .perfume-row::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    .perfume-row::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 4px;
        transition: background 0.2s ease;
    }

    .perfume-row::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }

    .perfume-slot {
        min-width: 160px;
        max-width: 160px;
        height: 480px;
        scroll-snap-align: center;
        flex: 0 0 auto;
        transform: translateZ(0);
    }

    /* Scroll indicators */
    .perfume-display::after,
    .perfume-display::before {
        content: '';
        position: absolute;
        top: 0;
        width: 60px;
        height: 100%;
        pointer-events: none;
        z-index: 2;
    }

    .perfume-display::after {
        right: 0;
        background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.7));
    }

    .perfume-display::before {
        left: 0;
        background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.7));
    }

    /* Scroll hint for touch devices */
    .perfume-row::after {
        content: 'Swipe to view more →';
        position: absolute;
        bottom: -0.5rem;
        left: 50%;
        transform: translateX(-50%);
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.8rem;
        white-space: nowrap;
        animation: fadeInOut 2s ease-in-out infinite;
        pointer-events: none;
    }

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

    .payment-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
    }

    .coin-payment {
        aspect-ratio: 1/1;
        max-width: 400px;
        margin: 0 auto;
    }

    .card-reader {
        margin-top: 0;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Tablet */
@media screen and (max-width: 1024px) {
    .vending-machine {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
        min-height: 90vh;
        gap: 1rem;
        padding: 1rem;
    }

    .perfume-display {
        height: auto;
        min-height: 420px;
        position: relative;
        padding: 0.5rem 0;
    }

    .perfume-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        gap: 1rem;
        padding: 0.5rem;
        margin: 0;
        position: relative;
        min-height: 420px;
    }

    .perfume-row::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .perfume-slot {
        min-width: 160px;
        max-width: 160px;
        height: 420px;
    }

    .payment-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        padding: 0.5rem;
        height: auto;
        min-height: 200px;
        margin-top: 1rem;
    }

    .coin-payment {
        aspect-ratio: auto;
        max-width: 400px;
        margin: 0 auto;
        height: auto;
        min-height: 180px;
    }

    .card-reader {
        margin-top: 0;
        max-width: 400px;
        margin: 0 auto;
        height: auto;
    }

    .text-display {
        height: auto;
        min-height: 80px;
        margin: 0;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .vending-machine {
        width: 100%;
        border-radius: 0;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .title-section {
        padding: 0.5rem;
    }

    .neon-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .perfume-row {
        padding: 0.5rem;
        min-height: 420px;
        margin: 0;
    }

    .perfume-slot {
        min-width: 160px;
        max-width: 160px;
        height: 420px;
    }

    .perfume-slot::after {
        top: -5%;
        left: -5%;
        right: -5%;
        bottom: -5%;
    }

    .perfume-display::after,
    .perfume-display::before {
        width: 40px;
    }

    .payment-section {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column-reverse;
        gap: 0.5rem;
        padding: 0;
    }

    .coin-payment {
        aspect-ratio: auto;
        padding: 0.5rem;
        height: auto;
    }

    .bitcoin-icon {
        font-size: 2.5rem;
    }

    .slot-display {
        font-size: 0.8rem;
    }

    .insert-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .text-display {
        font-size: 1rem;
        padding: 0.5rem;
        min-height: auto;
        height: auto;
        margin: 0;
    }

    .text-display p {
        padding: 0.4rem;
    }

    .qr-code {
        width: 100px;
        height: 100px;
        margin: 0 8px;
    }

    .qr-code img {
        padding: 1px;
    }

    .perfume-display {
        height: auto;
        min-height: 420px;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .perfume-slot {
        min-width: 160px;
        max-width: 160px;
        height: 380px;
    }

    .perfume-row {
        min-height: 380px;
    }

    .perfume-display {
        height: auto;
        min-height: 380px;
    }

    .neon-title {
        font-size: 1.5rem;
    }

    .text-display {
        font-size: 0.9rem;
        padding: 0.5rem;
        min-height: auto;
        height: auto;
    }

    .text-display p {
        padding: 0.3rem;
    }

    /* Horizontal layout for coin payment section */
    .coin-payment {
        height: auto;
        padding: 0.5rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .bitcoin-icon {
        font-size: 2rem;
        margin-right: 0.5rem;
    }

    .slot-display {
        font-size: 0.8rem;
        margin: 0;
        flex: 1;
    }

    .insert-button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-left: 0.5rem;
    }

    .qr-code {
        width: 80px;
        height: 80px;
        margin: 0 6px;
    }

    .qr-code img {
        padding: 1px;
    }

    /* Add scroll indicators for the carousel */
    .perfume-display::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 100%;
        background: linear-gradient(
            to right,
            transparent,
            rgba(0, 0, 0, 0.5)
        );
        pointer-events: none;
        z-index: 2;
    }

    .perfume-display::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 100%;
        background: linear-gradient(
            to left,
            transparent,
            rgba(0, 0, 0, 0.5)
        );
        pointer-events: none;
        z-index: 2;
    }

    /* Copyright text adjustments for mobile */
    .copyright {
        font-size: 0.6rem;
        bottom: 3px;
        right: 5px;
        padding: 0 5px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 3px;
    }

    .copyright p:not(:last-child)::after {
        margin: 0 3px;
    }
}

/* Handle landscape orientation on mobile */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .vending-machine {
        height: auto;
        min-height: 100vh;
        margin-bottom: 1rem;
    }

    .perfume-display {
        max-height: 100vh;
    }

    .payment-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .perfume-slot {
        height: 380px;
    }

    .text-display {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

/* Add touch scrolling hint */
@media (hover: none) {
    .perfume-row {
        position: relative;
    }

    .perfume-row::after {
        content: 'Swipe to view more →';
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.8rem;
        white-space: nowrap;
        animation: fadeInOut 2s ease-in-out infinite;
        pointer-events: none;
    }

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

/* Landscape Mode */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .vending-machine {
        height: auto;
        min-height: 100vh;
        margin-bottom: 1rem;
    }

    .perfume-display {
        height: auto;
        max-height: 35vh;
    }

    .perfume-slot {
        width: calc(20% - 1rem);
        height: 350px;
    }

    .payment-section {
        gap: 0.5rem;
    }

    .text-display {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
}

/* High Resolution Displays */
@media screen and (min-width: 1440px) {
    .vending-machine {
        max-width: 1400px;
    }

    .perfume-slot {
        margin: 0 1rem;
    }
} 