/* HTTPDaemons - Offline Game Styles
-------------------------------------------------- */

/* Game Container */
#game-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 20px;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    border-radius: 5px;
    z-index: 50;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: brightness(1.2) drop-shadow(2px 4px 6px black);
}

#gobackmainmenu{
    margin-top:1em;
}

#game-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/static.gif') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.game-loading-logo {
    margin-top: 10%;
    mix-blend-mode: difference;
    max-width: 15em;
    max-height: 15em;
}

#game-loading div {
    color: grey;
    mix-blend-mode: difference;
    font-size: 1.5em;
    text-align: center;
    margin-top: 20px;
}

/* Daemon Appearance */
.daemon-symbol-element {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.daemon-symbol {
    margin-bottom: 2px;
    font-size: 16px;
}

.daemon-eyes {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto;
}

.daemon-eyes .left-eye {
    margin-right: auto;
    margin-left: 8px;
}

.daemon-eyes .right-eye {
    margin-left: auto;
    margin-right: 8px;
}

.left-eye, .right-eye {
    display: inline-block;
    font-size: 14px;
}

.daemon-mouth {
    margin-top: 2px;
    font-size: 14px;
}

.daemon-symbols-container {
    pointer-events: none;
    transition: opacity 0.1s ease-out;
}

/* Game UI Elements */
.game-ui-element {
    position: absolute;
    font-family: 'Courier New', monospace;
    color: white;
    text-shadow: 0 0 4px #000000, 0 0 4px #000000;
    pointer-events: none;
    z-index: 1090;
    text-align: center;
    padding: 5px;
    font-weight: bold;
}

.game-clock {
    top: 3%;
    left: 2%;
    font-size: 14px;
    padding: 5px 10px;
}

.game-camera-label {
    top: calc(3% + 1.2em);
    left: 2%;
    font-size: 14px;
    padding: 5px 10px;
}

/* VHS Effects */
.vhs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1082;
    background-size: cover;
    background-position: center;
    opacity: 0.8;
}

.film-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1081;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjMwMCIgaGVpZ2h0PSIzMDAiIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iMC4wOCIvPjwvc3ZnPg==');
    opacity: 0.9;
}

.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,0.3) 50%);
    background-size: 100% 4px;
}

.vhs-bloom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1081;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
    filter: blur(4px);
    opacity: 1;
}

.recording-dot {
    position: absolute;
    width: 2vw;
    height: 2vw;
    border-radius: 50%;
    background-color: #ff0000;
    top: 2%;
    right: 2%;
    z-index: 1082;
    animation: blink 1s infinite;
}

.camera-movement {
    animation: cameraShake 15s infinite ease-in-out;
}

@keyframes cameraShake {
    0% { transform: translate(0, 0) scale(1.01); }
    25% { transform: translate(4px, 2px) scale(1.01); }
    50% { transform: translate(-2px, -2px) scale(1.01); }
    75% { transform: translate(-4px, 2px) scale(1.01); }
    100% { transform: translate(0, 0) scale(1.01); }
}

/* Interaction Styles */
.interaction-area {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.2);
    border: 2px dashed rgba(255, 0, 0, 0.5);
    opacity: 0;
    z-index: 50;
    pointer-events: none;
    transition: opacity 0.3s;
}

.interaction-area.visible {
    opacity: 1;
}

.interaction-bubble {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #FF0000;
    border-radius: 5px;
    padding: 10px;
    color: #FFFFFF;
    font-family: 'BasicFont', 'Courier New', monospace;
    font-size: 16px;
    text-align: center;
    z-index: 60;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    pointer-events: all;
    cursor: pointer;
    transition: all 0.2s ease;
    transform: translateX(-50%) translateY(-50%);
}

.interaction-bubble:hover {
    background-color: #FF0000;
    color: #000000;
}

/* Development Mode */
.dev-mode .interaction-area {
    opacity: 0.5;
}

.dev-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #FF0000;
    padding: 10px;
    z-index: 1000;
    font-family: monospace;
    font-size: 12px;
    color: #FFFFFF;
    width: 200px;
    display: none;
}

.dev-panel.visible {
    display: block;
}

.dev-panel h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #FF0000;
    text-align: center;
}

.dev-panel label {
    display: block;
    margin: 5px 0;
}

.dev-panel input {
    width: 60px;
    background-color: #333;
    border: 1px solid #666;
    color: #FFF;
    padding: 2px;
    text-align: right;
}

.dev-panel button {
    background-color: #FF0000;
    color: #000;
    border: none;
    padding: 3px 8px;
    font-size: 12px;
    margin-top: 10px;
    width: 100%;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .interaction-bubble {
        font-size: 14px;
        padding: 8px;
    }
    
    .game-ui-element {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .interaction-bubble {
        font-size: 12px;
        padding: 5px;
    }
    
    .game-ui-element {
        font-size: 10px;
    }
    
    #game-loading div {
        font-size: 1.2em;
    }
}