@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Press+Start+2P&display=swap');

:root {
    --coffee-brown: #8B4513;
    --coffee-light: #D2691E;
    --coffee-cream: #F5F5DC;
}

.pixel-font {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.9em;
}

.pixel-art {
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.pixel-border {
    border: 3px solid var(--coffee-brown);
    border-image: url("data:image/svg+xml,%3csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m0,0 l0,8 l8,0 l0,8 l8,0 l0,8 l8,0 l0,8 l8,0 l0,8 l8,0 l0,8 l8,0 l0,8 l8,0 l0,8 l8,0 l0,8 l8,0 l0,8 l8,0 l0,8 l-8,0 l0,8 l-8,0 l0,8 l-8,0 l0,8 l-8,0 l0,8 l-8,0 l0,8 l-8,0 l0,8 l-8,0 l0,8 l-8,0 l0,8 l-8,0 l0,8 l-8,0 l0,8 l8,0 l0,-8 l8,0 l0,-8 l8,0 l0,-8 l8,0 l0,-8 l8,0 l0,-8 l8,0 l0,-8 l8,0 l0,-8 l8,0 l0,-8 l8,0 l0,-8 l8,0 l0,-8 l8,0 l0,-8 z' fill='%23'/%3e%3c/svg%3e") 8;
}

.pixel-border-bottom {
    border-bottom: 4px solid var(--coffee-light);
}

.pixel-button {
    border: 2px solid currentColor;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

.pixel-button:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px rgba(0,0,0,0.3);
}

.pixel-button:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(0,0,0,0.1);
}

.pixel-input {
    border: 2px solid var(--coffee-light);
    font-family: 'Orbitron', monospace;
    background: white;
    transition: border-color 0.2s ease;
}

.pixel-input:focus {
    border-color: var(--coffee-brown);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
}

/* Card hover effects */
.coffee-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(139, 69, 19, 0.2);
}

/* Progress bar styling */
.progress-bar {
    background: linear-gradient(90deg, var(--coffee-brown) 0%, var(--coffee-light) 100%);
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--coffee-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--coffee-brown);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--coffee-light);
}

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Steam animation for coffee cups */
@keyframes steam {
    0%, 100% { opacity: 0.5; transform: translateY(0) scaleX(1); }
    50% { opacity: 1; transform: translateY(-10px) scaleX(1.1); }
}

.steam {
    animation: steam 2s ease-in-out infinite;
}

/* Pixel art grid effect */
.pixel-grid {
    background-image: 
        linear-gradient(45deg, rgba(139, 69, 19, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(139, 69, 19, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(139, 69, 19, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(139, 69, 19, 0.05) 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

/* Retro gaming inspired effects */
.retro-shadow {
    box-shadow: 
        2px 2px 0px var(--coffee-light),
        4px 4px 0px var(--coffee-brown);
}

.retro-text-shadow {
    text-shadow: 
        1px 1px 0px var(--coffee-brown),
        2px 2px 0px rgba(0,0,0,0.3);
}

/* Coffee bean animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.coffee-bean-bounce {
    animation: bounce 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pixel-font {
        font-size: 0.7em;
    }
    
    .pixel-border {
        border-width: 2px;
    }
    
    .pixel-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Loading states for images */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for better accessibility */
button:focus, input:focus {
    outline: 2px solid var(--coffee-brown);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pixel-border {
        border-color: #000;
        border-width: 3px;
    }
    
    .pixel-button {
        border-color: #000;
        font-weight: 700;
    }
}