/* RetroQuest - AI-Powered Text Adventure Game Styles */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Fira+Code:wght@400;700&display=swap');

/* Core retro aesthetic */
body {
    background: #1A1A1A;
    color: #FFB000;
    font-family: 'Fira Code', 'Courier New', monospace;
    overflow: hidden;
}

/* CRT scanlines effect */
.scanlines::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
        linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Typography */
.retro-title {
    font-family: 'Press Start 2P', monospace;
    text-shadow: 
        0 0 5px #FFB000,
        0 0 10px #FFB000,
        0 0 15px #FFB000;
}

.retro-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.terminal-text {
    color: #FFB000;
    text-shadow: 0 0 3px currentColor;
}

.typewriter-text {
    line-height: 1.6;
    letter-spacing: 0.05em;
}

/* Terminal-style borders */
.terminal-border {
    border-style: solid;
    border-color: #FFB000;
    box-shadow: 
        0 0 10px rgba(255, 176, 0, 0.3),
        inset 0 0 10px rgba(255, 176, 0, 0.1);
}

.terminal-panel {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 2px solid #FFB000;
}

/* Retro buttons */
.retro-button {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8);
    box-shadow: 
        2px 2px 0px rgba(0, 0, 0, 0.5),
        inset -1px -1px 0px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0px rgba(255, 255, 255, 0.1),
        0 0 5px rgba(255, 176, 0, 0.3);
    transition: all 0.1s ease;
    letter-spacing: 0.05em;
}

.retro-button:hover:not(:disabled) {
    transform: translate(1px, 1px);
    box-shadow: 
        1px 1px 0px rgba(0, 0, 0, 0.5),
        inset -1px -1px 0px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0px rgba(255, 255, 255, 0.1),
        0 0 8px rgba(255, 176, 0, 0.5);
}

.retro-button:active:not(:disabled) {
    transform: translate(2px, 2px);
    box-shadow: 
        0 0 2px rgba(255, 176, 0, 0.5);
}

/* Terminal input styling */
.terminal-input {
    background: #111827 !important;
    border: 2px solid #374151 !important;
    color: #00FF41 !important;
    font-family: 'Fira Code', monospace;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.terminal-input:focus {
    border-color: #FFB000 !important;
    box-shadow: 
        0 0 0 1px #FFB000,
        0 0 10px rgba(255, 176, 0, 0.3);
    outline: none;
}

.terminal-input::placeholder {
    color: #6B7280;
}

/* Pixelated images */
.pixelated {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
}

/* Hover effects */
.pixel-hover:hover {
    background: rgba(255, 176, 0, 0.1) !important;
    border-color: #FFB000 !important;
    box-shadow: 0 0 5px rgba(255, 176, 0, 0.3);
}

/* Loading animation */
@keyframes pixel-pulse {
    0%, 100% { 
        opacity: 1; 
        color: #FFB000;
    }
    50% { 
        opacity: 0.5; 
        color: #00FF41;
    }
}

.pixel-loading {
    animation: pixel-pulse 1s infinite;
    font-family: 'Press Start 2P', monospace;
}

/* Inventory grid effect */
.inventory-grid {
    background-image: 
        linear-gradient(rgba(255, 176, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 176, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 4px;
}

/* Text glow effects */
.text-amber-300 {
    color: #FFB000 !important;
    text-shadow: 0 0 3px currentColor;
}

.text-green-400 {
    color: #00FF41 !important;
    text-shadow: 0 0 2px currentColor;
}

.text-red-400 {
    color: #FF4444 !important;
    text-shadow: 0 0 2px currentColor;
}

.text-blue-400 {
    color: #4444FF !important;
    text-shadow: 0 0 2px currentColor;
}

.text-purple-400 {
    color: #AA44FF !important;
    text-shadow: 0 0 2px currentColor;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
    border: 1px solid #FFB000;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FFB000, #CC8800);
    border: 1px solid #AA7700;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FFCC00, #FFB000);
}

/* Panel depth effects */
.terminal-panel {
    box-shadow: 
        inset 2px 2px 4px rgba(255, 176, 0, 0.1),
        inset -2px -2px 4px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(255, 176, 0, 0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    .retro-button {
        font-size: 0.6rem;
        padding: 0.5rem;
    }
    
    .retro-title {
        font-size: 1.5rem;
    }
    
    .terminal-text {
        font-size: 0.75rem;
    }
}

/* Animation for text changes */
.typewriter-text {
    animation: fadeIn 0.5s ease-in;
}

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

/* Button state improvements */
.retro-button:disabled {
    opacity: 0.5;
    transform: none !important;
    box-shadow: 
        1px 1px 0px rgba(0, 0, 0, 0.5),
        inset -1px -1px 0px rgba(0, 0, 0, 0.3);
    cursor: not-allowed;
}

/* Enhanced terminal look */
.bg-gray-800 {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
}

.bg-gray-900 {
    background: linear-gradient(135deg, #111827 0%, #0f172a 100%) !important;
}

/* Matrix-style text cursor */
.terminal-input:focus::after {
    content: '▊';
    color: #00FF41;
    animation: blink 1s infinite;
}

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