@tailwind base;
@tailwind components;
@tailwind utilities;

/* Press Start 2P and Inter are loaded via css/fonts.css (self-hosted) */

*  {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

.retro-font {
    font-family: 'Press Start 2P', cursive;
}

.commodore-blue {
    background-color: #6b5eb5;
}

.commodore-light-blue {
    background-color: #a2b0d8;
}

.commodore-border {
    border: 4px solid #4040a0;
}

input::placeholder {
    color: rgb(0, 0, 0); 
    opacity: 1; 
    font-size: 12px;
}

.retro-input {
    background-color: #a2b0d8;
    border: 2px solid #4040a0;
    color: #4040a0;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    padding: 0.75rem;
    width: 100%;
    outline: none;
}

.retro-input:focus {
    background-color: #c5d0e8;
    box-shadow: inset 0 0 0 2px #4040a0;
}

.retro-btn {
    background-color: #4040a0;
    color: #a2b0d8;
    border: 3px solid #6b5eb5;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0px #2a2a70;
    padding: 0.75rem 1rem;
    text-transform: uppercase;
}

.retro-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #2a2a70;
    background-color: #5050c0;
}

.retro-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #2a2a70;
}

.retro-btn.danger {
    background-color: #8b2635;
    border-color: #a03040;
    box-shadow: 4px 4px 0px #5a1a22;
}

.retro-btn.danger:hover {
    background-color: #a03040;
    box-shadow: 2px 2px 0px #5a1a22;
}

.retro-btn.success {
    background-color: #2d5a27;
    border-color: #3d7a35;
    box-shadow: 4px 4px 0px #1a3516;
}

.retro-btn.success:hover {
    background-color: #3d7a35;
    box-shadow: 2px 2px 0px #1a3516;
}

.step-active {
    background-color: #4040a0;
    color: #a2b0d8;
}

.step-inactive {
    background-color: #6b5eb5;
    color: #4040a0;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.scanlines {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.1)
    );
    background-size: 100% 4px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 50;
}

.crt-flicker {
    animation: flicker 0.01s infinite;
}

@keyframes flicker {
    0% { opacity: 0.99; }
    50% { opacity: 1; }
    100% { opacity: 0.99; }
}

.log-entry {
    border-left: 3px solid #4040a0;
    padding-left: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.log-entry::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 9px;
    height: 9px;
    background: #4040a0;
    border-radius: 50%;
}

.log-entry.newest {
    border-left-color: #a2b0d8;
}

.log-entry.newest::before {
    background: #a2b0d8;
}

.hidden { 
    display: none !important; 
}

/* Scrollbar styling for retro feel */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #6b5eb5;
}

::-webkit-scrollbar-thumb {
    background: #4040a0;
    border: 2px solid #6b5eb5;
}

::-webkit-scrollbar-thumb:hover {
    background: #5050c0;
}

/* Modal animations */
.modal-enter {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Notification animations */
.animate-slide-down {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .retro-font {
        font-size: 0.6rem;
    }
    
    .retro-btn {
        font-size: 0.6rem;
        padding: 0.5rem;
    }
}