/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', monospace;
    background: #000000;
    color: #00ff00;
    overflow: hidden;
    height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Main container */
.main-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    overflow: hidden;
}

/* Background styling */
.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background-image {
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    filter: none;
}

.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 50%, rgba(255, 0, 255, 0.01) 50%),
        linear-gradient(0deg, transparent 50%, rgba(0, 255, 255, 0.01) 50%);
    background-size: 4px 4px;
    animation: glitch 0.3s infinite linear;
    pointer-events: none;
    z-index: 2;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
}

/* Character container - на весь экран */
.character-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-sprite {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: none;
    opacity: 1;
    z-index: 1;
}

.character-sprite img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center;
    filter: drop-shadow(0 0 50px #ff00ff);
    transition: all 0.3s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    position: fixed;
    top: 0;
    left: 0;
}

.character-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.character-sprite.speaking .character-glow {
    opacity: 1;
    animation: pulse-glow 0.5s ease-in-out;
}

.character-sprite.speaking {
    filter: blur(0.5px);
    opacity: 0.9;
}

.character-sprite.speaking img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 50px #ff00ff) brightness(1.3) contrast(1.1);
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

/* Chat container - справа как боковая панель */
.chat-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 80;
    width: 400px;
    height: calc(100vh - 40px);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ffff;
    border-radius: 15px;
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.8),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #00ffff;
    background: rgba(0, 255, 255, 0.15);
    border-radius: 15px 15px 0 0;
}

.terminal-title {
    color: #00ffff;
    font-size: 0.8rem;
    text-shadow: 0 0 10px #00ffff;
}

.status-indicator {
    color: #00ff00;
    font-size: 1rem;
    animation: blink 1s infinite;
}

.status-indicator.typing {
    color: #ffff00;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Chat messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    margin: 0;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 4px;
}

.message {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 5px;
    animation: fadeIn 0.3s ease-in;
}

    .user-message {
        background: rgba(255, 0, 255, 0.1);
        border-left: 3px solid #ff00ff;
        color: #ff00ff;
        margin-bottom: 0.8rem;
        padding: 0.4rem;
        border-radius: 0 6px 6px 0;
    }
    
    .elon-message {
        background: rgba(0, 255, 255, 0.1);
        border-left: 3px solid #00ffff;
        color: #00ffff;
        margin-bottom: 0.8rem;
        padding: 0.4rem;
        border-radius: 0 6px 6px 0;
    }

.system-message {
    color: #888;
    font-size: 0.7rem;
    margin-bottom: 1rem;
}

.prompt {
    color: #00ff00;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input container */
.input-container {
    padding: 1.5rem;
    border-top: 2px solid #00ffff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 0 0 15px 15px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

#message-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    border-radius: 8px;
    padding: 1rem;
    color: #00ff00;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    outline: none;
    transition: all 0.3s ease;
    resize: none;
    min-height: 60px;
}

#message-input:focus {
    border-color: #ff00ff;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
    background: rgba(0, 0, 0, 0.9);
}

#message-input::placeholder {
    color: #666;
}

/* Neon button */
.neon-button {
    position: relative;
    background: transparent;
    border: 2px solid #ff00ff;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: #ff00ff;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    width: 100%;
}

.neon-button:hover {
    background: rgba(255, 0, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    transform: translateY(-2px);
}

.neon-button:active {
    transform: translateY(0);
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.neon-button:hover .button-glow {
    left: 100%;
}

/* Typing indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #ffff00;
    font-size: 0.7rem;
}

.typing-indicator.show {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 0.2rem;
}

.typing-dots span {
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* Neon borders */
.neon-border {
    position: absolute;
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
    z-index: 5;
}

.neon-border.top {
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    animation: border-flow 3s linear infinite;
}

.neon-border.right {
    top: 0;
    right: 0;
    bottom: 0;
    width: 2px;
    animation: border-flow 3s linear infinite 0.75s;
}

.neon-border.bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    animation: border-flow 3s linear infinite 1.5s;
}

.neon-border.left {
    top: 0;
    left: 0;
    bottom: 0;
    width: 2px;
    animation: border-flow 3s linear infinite 2.25s;
}

@keyframes border-flow {
    0% { background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff); }
    25% { background: linear-gradient(90deg, #00ffff, #ff00ff, #00ffff); }
    50% { background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff); }
    75% { background: linear-gradient(90deg, #00ffff, #ff00ff, #00ffff); }
    100% { background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff); }
}

/* Particle effects */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00ffff;
    border-radius: 50%;
    animation: float 6s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Responsive design for 1376x768 */
@media (min-width: 1376px) {
    .character-sprite {
        width: 100vw;
        height: 100vh;
    }
    
    .character-sprite img {
        width: 100vw;
        height: 100vh;
        filter: drop-shadow(0 0 60px #ff00ff);
    }
    
    .character-sprite.speaking img {
        filter: drop-shadow(0 0 80px #ff00ff) brightness(1.4) contrast(1.2);
    }
    
    .chat-container {
        width: 450px;
        right: 30px;
        top: 30px;
        height: calc(100vh - 60px);
    }
    
    .character-glow {
        top: -50px;
        left: -50px;
        right: -50px;
        bottom: -50px;
    }
}

@media (max-width: 1376px) {
    .character-sprite {
        width: 100vw;
        height: 100vh;
    }
    
    .character-sprite img {
        width: 100vw;
        height: 100vh;
    }
    
    .chat-container {
        width: 350px;
        right: 15px;
        top: 15px;
        height: calc(100vh - 30px);
    }
}

/* Мобильный адаптив */
@media (max-width: 768px) {
    .character-sprite {
        width: 100vw;
        height: 100vh;
    }
    
    .character-sprite img {
        width: 100vw;
        height: 100vh;
        object-fit: cover;
        object-position: center;
    }
    
    .chat-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: 35vh;
        border-radius: 12px 12px 0 0;
        border: 1px solid #00ffff;
        border-bottom: none;
        z-index: 100;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
    }
    
    .chat-header {
        padding: 0.4rem;
        font-size: 0.6rem;
        border-bottom: 1px solid #00ffff;
        cursor: pointer;
        user-select: none;
        transition: all 0.3s ease;
    }
    
    .chat-header:hover {
        background: rgba(0, 255, 255, 0.1);
    }
    
    .chat-container.collapsed {
        height: 50px;
    }
    
    .chat-container.collapsed .chat-messages,
    .chat-container.collapsed .input-container {
        display: none;
    }
    
    .chat-messages {
        height: calc(35vh - 120px);
        padding: 0.3rem;
        font-size: 0.8rem;
        max-height: 120px;
        overflow-y: auto;
    }
    
    .input-container {
        padding: 0.1rem 0.2rem 0.1rem 0.2rem;
        border-radius: 0 0 12px 12px;
        background: rgba(0, 255, 255, 0.1);
        border-top: 1px solid #00ffff;
    }
    
    .input-wrapper {
        flex-direction: column;
        gap: 0.1rem;
    }
    
    #message-input {
        font-size: 0.6rem;
        padding: 0.3rem;
        min-height: 32px;
        border-radius: 6px;
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid #00ffff;
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
        transition: all 0.3s ease;
        text-align: left;
        vertical-align: middle;
        line-height: 1.4;
        resize: none;
        display: flex;
        align-items: center;
    }
    
    #message-input:focus {
        border-color: #ff00ff;
        box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
        background: rgba(0, 0, 0, 0.9);
    }
    
    .neon-button {
        width: 100%;
        padding: 0.3rem;
        font-size: 0.6rem;
        border-radius: 6px;
        min-height: 32px;
        background: rgba(255, 0, 255, 0.1);
        border: 2px solid #ff00ff;
        box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
        transition: all 0.3s ease;
    }
    
    .neon-button:hover {
        background: rgba(255, 0, 255, 0.2);
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
        transform: translateY(-1px);
    }
    
    .neon-button:active {
        transform: translateY(0);
        box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
    }
    
    .typing-indicator {
        font-size: 0.6rem;
    }
    
    .message {
        font-size: 0.8rem;
        padding: 0.4rem;
        margin-bottom: 0.6rem;
        line-height: 1.6;
    }
    
    .system-message {
        font-size: 0.7rem;
        padding: 0.3rem;
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }
    
    .prompt {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
        display: block;
    }
}

/* Адаптив для очень маленьких экранов */
@media (max-width: 480px) {
    .chat-container {
        height: 40vh;
        border-radius: 10px 10px 0 0;
    }
    
    .chat-header {
        padding: 0.3rem;
        font-size: 0.5rem;
    }
    
    .chat-messages {
        height: calc(40vh - 100px);
        padding: 0.25rem;
        font-size: 0.7rem;
        max-height: 100px;
        overflow-y: auto;
    }
    
    .input-container {
        padding: 0.05rem 0.15rem 0.05rem 0.15rem;
        background: rgba(0, 255, 255, 0.1);
        border-top: 1px solid #00ffff;
    }
    
    #message-input {
        font-size: 0.5rem;
        padding: 0.2rem;
        min-height: 28px;
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid #00ffff;
        box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
        transition: all 0.3s ease;
        text-align: left;
        vertical-align: middle;
        line-height: 1.4;
        resize: none;
        display: flex;
        align-items: center;
    }
    
    #message-input:focus {
        border-color: #ff00ff;
        box-shadow: 0 0 12px rgba(255, 0, 255, 0.5);
        background: rgba(0, 0, 0, 0.9);
    }
    
    .neon-button {
        padding: 0.2rem;
        font-size: 0.5rem;
        min-height: 28px;
        background: rgba(255, 0, 255, 0.1);
        border: 2px solid #ff00ff;
        box-shadow: 0 0 8px rgba(255, 0, 255, 0.3);
        transition: all 0.3s ease;
    }
    
    .neon-button:hover {
        background: rgba(255, 0, 255, 0.2);
        box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
        transform: translateY(-1px);
    }
    
    .message {
        font-size: 0.7rem;
        padding: 0.3rem;
        margin-bottom: 0.5rem;
        line-height: 1.6;
    }
    
    .system-message {
        font-size: 0.6rem;
        padding: 0.25rem;
        margin-bottom: 0.4rem;
        line-height: 1.5;
    }
    
    .prompt {
        font-size: 0.6rem;
        margin-bottom: 0.15rem;
        display: block;
    }
    
    .typing-indicator {
        font-size: 0.5rem;
    }
}

/* Адаптив для ландшафтной ориентации на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .chat-container {
        height: 40vh;
        border-radius: 10px 10px 0 0;
    }
    
    .chat-messages {
        height: calc(40vh - 80px);
    }
    
    .character-sprite img {
        object-position: center top;
    }
}

/* Мобильные улучшения */
@media (max-width: 768px) {
    /* Улучшения для touch-устройств */
    .neon-button {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    #message-input {
        touch-action: manipulation;
        -webkit-appearance: none;
        border-radius: 10px;
        display: block;
        box-sizing: border-box;
        width: 100%;
        text-align: left;
        vertical-align: top;
        line-height: 1.5;
        padding-top: 0.3rem;
        padding-bottom: 0.3rem;
        font-family: 'Press Start 2P', monospace;
        font-size: 0.6rem;
        color: #00ff00;
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid #00ffff;
        outline: none;
        resize: none;
    }
    
    #message-input::placeholder {
        color: #666;
        font-size: 0.6rem;
        line-height: 1.5;
        padding-top: 0.1rem;
    }
    
    /* Улучшенная прокрутка */
    .chat-messages {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Убираем выделение текста */
    .chat-container {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Разрешаем выделение в поле ввода */
    #message-input {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    /* Улучшенные анимации для мобильных */
    .character-sprite.speaking {
        animation: mobile-pulse 0.5s ease-in-out;
    }
    
@keyframes mobile-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Hotline Miami effects */
@keyframes glare-sweep {
    0% { 
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* Enhanced speaking effects */
.character-sprite.speaking {
    animation: hotline-pulse 0.5s ease-in-out infinite;
    filter: brightness(1.2) contrast(1.1) saturate(1.3);
}

.character-sprite.speaking img {
    animation: hotline-zoom 0.5s ease-in-out;
    filter: drop-shadow(0 0 60px #ff00ff) brightness(1.4) contrast(1.2);
}

@keyframes hotline-pulse {
    0%, 100% { 
        transform: scale(1.1);
        filter: brightness(1.3) contrast(1.1);
    }
    50% { 
        transform: scale(1.15);
        filter: brightness(1.5) contrast(1.3);
    }
}

@keyframes hotline-zoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}

/* Prize number animation */
.prize-number {
    transition: all 0.5s ease;
}

.prize-number.reveal {
    animation: prizeReveal 0.8s ease-out;
}

@keyframes prizeReveal {
    0% { 
        transform: scale(0.5);
        opacity: 0;
        filter: blur(10px);
    }
    50% { 
        transform: scale(1.3);
        opacity: 1;
        filter: blur(0px);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
        filter: blur(0px);
    }
}
}

/* Additional animations */
@keyframes screen-flicker {
    0%, 100% { opacity: 1; }
    98% { opacity: 1; }
    99% { opacity: 0.8; }
}

.main-container {
    animation: screen-flicker 0.15s infinite linear;
}

/* Text effects */
.text-glow {
    text-shadow: 0 0 10px currentColor;
}

.neon-text {
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff;
}

/* Mission notification - Hotline Miami style */
.mission-notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: missionFadeIn 0.5s ease-in;
}

.mission-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 48%, rgba(255, 0, 255, 0.1) 49%, rgba(255, 0, 255, 0.1) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(0, 255, 255, 0.1) 49%, rgba(0, 255, 255, 0.1) 51%, transparent 52%);
    background-size: 20px 20px;
    animation: missionPattern 2s linear infinite;
}

.mission-content {
    position: relative;
    z-index: 10;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ff00ff;
    border-radius: 15px;
    padding: 3rem 4rem;
    box-shadow: 
        0 0 30px rgba(255, 0, 255, 0.5),
        inset 0 0 30px rgba(255, 0, 255, 0.1);
    animation: missionPulse 2s ease-in-out infinite;
    max-width: 500px;
    width: 90%;
}

.mission-title {
    font-size: 1.2rem;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    animation: missionGlow 1.5s ease-in-out infinite alternate;
}

.mission-description {
    font-size: 1rem;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    margin-bottom: 2rem;
    letter-spacing: 1px;
    line-height: 1.4;
}

.mission-accept {
    font-size: 0.8rem;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
    letter-spacing: 1px;
    animation: missionBlink 1s ease-in-out infinite;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 1px solid #ffff00;
    border-radius: 5px;
    background: rgba(255, 255, 0, 0.1);
    transition: all 0.3s ease;
}

.mission-accept:hover {
    background: rgba(255, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.5);
    transform: scale(1.05);
}

/* Mission animations */
@keyframes missionFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes missionPulse {
    0%, 100% { 
        box-shadow: 
            0 0 30px rgba(255, 0, 255, 0.5),
            inset 0 0 30px rgba(255, 0, 255, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 50px rgba(255, 0, 255, 0.8),
            inset 0 0 50px rgba(255, 0, 255, 0.2);
    }
}

@keyframes missionGlow {
    from { text-shadow: 0 0 10px #ff00ff; }
    to { text-shadow: 0 0 20px #ff00ff, 0 0 30px #ff00ff; }
}

@keyframes missionBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

@keyframes missionPattern {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(20px) translateY(20px); }
}

@keyframes missionFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.8); }
}

/* Mission notification mobile */
@media (max-width: 768px) {
    .mission-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .mission-title {
        font-size: 1rem;
    }
    
    .mission-description {
        font-size: 0.8rem;
    }
    
    .mission-accept {
        font-size: 0.7rem;
    }
}

/* Prize notification - Hotline Miami style */
.prize-notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: prizeFadeIn 0.8s ease-in;
}

.prize-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 0, 0.1) 0%, transparent 50%);
    animation: prizeGlow 3s ease-in-out infinite alternate;
}

.prize-content {
    position: relative;
    z-index: 10;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ffff00;
    border-radius: 20px;
    padding: 3rem 4rem;
    box-shadow: 
        0 0 40px rgba(255, 255, 0, 0.6),
        inset 0 0 40px rgba(255, 255, 0, 0.1);
    animation: prizePulse 2s ease-in-out infinite;
    max-width: 600px;
    width: 90%;
}

.prize-title {
    font-size: 1.5rem;
    color: #ffff00;
    text-shadow: 0 0 15px #ffff00;
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
    animation: prizeTitleGlow 2s ease-in-out infinite alternate;
}

.prize-description {
    font-size: 1rem;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    line-height: 1.4;
}

.prize-community {
    font-size: 0.9rem;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.prize-amount {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 0, 0.1);
    border-radius: 10px;
    border: 2px solid #ffff00;
}

.prize-label {
    display: block;
    font-size: 0.9rem;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    margin-bottom: 0.5rem;
}

.prize-number {
    font-size: 2.5rem;
    color: #ffff00;
    text-shadow: 0 0 20px #ffff00;
    font-weight: bold;
    letter-spacing: 2px;
    animation: prizeNumberCount 3s ease-out;
    margin: 0.5rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.prize-currency {
    display: block;
    font-size: 1.2rem;
    color: #ff00ff;
    text-shadow: 0 0 15px #ff00ff;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

.prize-button {
    font-size: 1rem;
    color: #000000;
    background: linear-gradient(45deg, #ffff00, #ffaa00);
    border: 2px solid #ffff00;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-family: 'Press Start 2P', monospace;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
    animation: prizeButtonPulse 1.5s ease-in-out infinite;
}

.prize-button:hover {
    background: linear-gradient(45deg, #ffaa00, #ffff00);
    box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
    transform: scale(1.05);
}

.prize-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.6);
}

/* Prize animations */
@keyframes prizeFadeIn {
    from { opacity: 0; transform: scale(0.5) rotate(-5deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes prizePulse {
    0%, 100% { 
        box-shadow: 
            0 0 40px rgba(255, 255, 0, 0.6),
            inset 0 0 40px rgba(255, 255, 0, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 60px rgba(255, 255, 0, 0.8),
            inset 0 0 60px rgba(255, 255, 0, 0.2);
    }
}

@keyframes prizeTitleGlow {
    from { text-shadow: 0 0 15px #ffff00; }
    to { text-shadow: 0 0 25px #ffff00, 0 0 35px #ffff00; }
}

@keyframes prizeNumberCount {
    0% { 
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes prizeButtonPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
        transform: scale(1.02);
    }
}

@keyframes prizeGlow {
    from { opacity: 0.3; }
    to { opacity: 0.7; }
}

@keyframes prizeFadeOut {
    from { opacity: 1; transform: scale(1) rotate(0deg); }
    to { opacity: 0; transform: scale(0.5) rotate(5deg); }
}

/* Prize notification mobile */
@media (max-width: 768px) {
    .prize-content {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        max-width: 95%;
        width: 95%;
    }
    
    .prize-title {
        font-size: 1rem;
        margin-bottom: 1rem;
        letter-spacing: 1px;
    }
    
    .prize-description {
        font-size: 0.7rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }
    
    .prize-community {
        font-size: 0.6rem;
        margin-bottom: 1.5rem;
    }
    
    .prize-amount {
        margin-bottom: 1.5rem;
        padding: 0.8rem;
    }
    
    .prize-label {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    .prize-number {
        font-size: 1.5rem;
        letter-spacing: 1px;
        word-break: break-all;
        line-height: 1.2;
        margin: 0.3rem 0;
    }
    
    .prize-currency {
        font-size: 0.8rem;
        letter-spacing: 1px;
        margin-top: 0.3rem;
    }
    
    .prize-button {
        font-size: 0.7rem;
        padding: 0.6rem 1.2rem;
        letter-spacing: 0.5px;
    }
}

/* Prize notification for very small screens */
@media (max-width: 480px) {
    .prize-content {
        padding: 1rem 0.8rem;
        margin: 0.3rem;
        max-width: 98%;
        width: 98%;
    }
    
    .prize-title {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
        letter-spacing: 0.5px;
    }
    
    .prize-description {
        font-size: 0.6rem;
        line-height: 1.2;
        margin-bottom: 0.6rem;
    }
    
    .prize-community {
        font-size: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .prize-amount {
        margin-bottom: 1rem;
        padding: 0.6rem;
    }
    
    .prize-label {
        font-size: 0.6rem;
        margin-bottom: 0.2rem;
    }
    
    .prize-number {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
        word-break: break-all;
        line-height: 1.1;
        margin: 0.2rem 0;
    }
    
    .prize-currency {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        margin-top: 0.2rem;
    }
    
    .prize-button {
        font-size: 0.6rem;
        padding: 0.5rem 1rem;
        letter-spacing: 0.3px;
    }
}

/* Prize notification for landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .prize-content {
        padding: 1rem 0.8rem;
        margin: 0.3rem;
        max-width: 98%;
        width: 98%;
    }
    
    .prize-title {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }
    
    .prize-description {
        font-size: 0.6rem;
        margin-bottom: 0.5rem;
    }
    
    .prize-community {
        font-size: 0.5rem;
        margin-bottom: 0.8rem;
    }
    
    .prize-amount {
        margin-bottom: 0.8rem;
        padding: 0.5rem;
    }
    
    .prize-number {
        font-size: 1.1rem;
        letter-spacing: 0.5px;
        margin: 0.2rem 0;
    }
    
    .prize-currency {
        font-size: 0.6rem;
        margin-top: 0.2rem;
    }
    
    .prize-button {
        font-size: 0.5rem;
        padding: 0.4rem 0.8rem;
    }
}
