@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono:wght@400&family=Rajdhani:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'Bender';
    src: url("/fonts/Bender.otf") format("opentype");
}

html, body {
    margin: 0;
    padding: 0;
    background-color: #0a0a0a;
    font-family: 'Bender', 'Rajdhani', 'Courier New', monospace;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.hud-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    pointer-events: none;
}

.hud-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    width: 100%;
}

.page-heading {
    color: #e7e5d4;
    font-size: 3.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-shadow: 
        0 0 10px rgba(255, 140, 0, 0.8),
        0 0 20px rgba(255, 140, 0, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.9);
    margin: 10px 0 15px 0;
    font-family: 'Bender', 'Rajdhani', sans-serif;
    pointer-events: none;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #e7e5d4;
    box-shadow: 
        0 0 10px rgba(255, 140, 0, 0.4),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
    font-family: 'Bender', 'Share Tech Mono', monospace;
    pointer-events: none;
    transition: all 0.3s ease;
}

.status-indicator.error {
    border-color: #ff4444;
    box-shadow: 
        0 0 10px rgba(255, 68, 68, 0.6),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.status-label {
    color: #888;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-value {
    color: #00ff00;
    font-size: 1em;
    font-weight: bold;
    text-shadow: 
        0 0 8px rgba(0, 255, 0, 0.8),
        0 0 15px rgba(0, 255, 0, 0.4);
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.status-value.error {
    color: #ff4444;
    text-shadow: 
        0 0 8px rgba(255, 68, 68, 0.8),
        0 0 15px rgba(255, 68, 68, 0.6);
}

#background {
    position: relative;
    box-shadow: 
        0 0 20px rgba(255, 140, 0, 0.3),
        0 0 40px rgba(0, 0, 0, 0.8),
        inset 0 0 100px rgba(0, 0, 0, 0.5);
    height: 1080px;
    width: 1920px;
    border: 2px solid #e7e5d4;
    background: #0a0a0a;
    overflow: hidden;
    transform-origin: center center;
    transform: scale(min(1, calc((100vw - 40px) / 1920px), calc((100vh - 200px) / 1080px)));
}

#background img {
    height: 1080px;
    width: 1920px;
    opacity: 0.85;
    filter: brightness(0.9);
}

.day {
    height: 110px;
    width: 75px;
    border: 2px solid #e7e5d4;
    position: absolute;
    cursor: pointer;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(2px);
    transition: all 0.2s ease;
    box-shadow: 
        0 0 8px rgba(255, 140, 0, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.day::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid rgba(255, 140, 0, 0.3);
    pointer-events: none;
}

.day:hover {
    border-color: #ffaa00;
    box-shadow: 
        0 0 15px rgba(255, 140, 0, 0.8),
        0 0 30px rgba(255, 140, 0, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
    z-index: 10;
    background: rgba(20, 20, 20, 0.9);
}

.day.opened {
    background: rgba(255, 140, 0, 0.15);
    border-color: #e7e5d4;
    border-style: solid;
    box-shadow: 
        0 0 10px rgba(255, 140, 0, 0.5),
        inset 0 0 30px rgba(255, 140, 0, 0.1);
}

.day.opened::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e7e5d4;
    font-size: 2em;
    font-weight: bold;
    opacity: 0.6;
    pointer-events: none;
}

.day.today {
    background: rgba(0, 200, 0, 0.2);
    border-color: #00ff00;
    border-width: 3px;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.8),
        0 0 40px rgba(0, 255, 0, 0.4),
        inset 0 0 30px rgba(0, 255, 0, 0.1);
    animation: pulse-glow 2s ease-in-out infinite;
}

.day.today::before {
    border-color: rgba(0, 255, 0, 0.5);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(0, 255, 0, 0.8),
            0 0 40px rgba(0, 255, 0, 0.4),
            inset 0 0 30px rgba(0, 255, 0, 0.1);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(0, 255, 0, 1),
            0 0 60px rgba(0, 255, 0, 0.6),
            inset 0 0 40px rgba(0, 255, 0, 0.2);
    }
}

.day-label {
    position: absolute;
    bottom: 6px;
    right: 6px;
    color: #e7e5d4;
    font-size: 1.4em;
    font-weight: 700;
    font-family: 'Share Tech Mono', monospace;
    text-shadow: 
        0 0 8px rgba(255, 140, 0, 0.8),
        0 0 15px rgba(255, 140, 0, 0.5),
        2px 2px 4px rgba(0, 0, 0, 1);
    letter-spacing: 0.05em;
    z-index: 2;
}

.day.opened .day-label {
    color: #ffaa00;
    text-shadow: 
        0 0 8px rgba(255, 170, 0, 0.8),
        0 0 15px rgba(255, 170, 0, 0.5),
        2px 2px 4px rgba(0, 0, 0, 1);
}

.day.today .day-label {
    color: #00ff00;
    text-shadow: 
        0 0 10px rgba(0, 255, 0, 1),
        0 0 20px rgba(0, 255, 0, 0.6),
        2px 2px 4px rgba(0, 0, 0, 1);
    font-size: 1.6em;
}

#modal {
    display: none;
}

#modal.modal-open {
    display: flex;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#modal-backdrop {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10001;
}

#modal > .modal-container {
    width: 900px;
    max-width: 90vw;
    min-height: 500px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    z-index: 10002;
    display: grid;
    grid-template-rows: auto 1fr auto;
    border: 2px solid #e7e5d4;
    box-shadow: 
        0 0 30px rgba(255, 140, 0, 0.6),
        0 0 60px rgba(0, 0, 0, 0.9),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

#modal > .modal-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid rgba(255, 140, 0, 0.3);
    pointer-events: none;
    z-index: -1;
}

#modal .modal-header {
    border-bottom: 2px solid #e7e5d4;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#modal .modal-header > .heading {
    padding: 25px 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

#modal .modal-header > .heading h4 {
    padding: 0;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #e7e5d4;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 
        0 0 10px rgba(255, 140, 0, 0.8),
        0 0 20px rgba(255, 140, 0, 0.4);
}

#modal .modal-header > .heading .close-modal {
    cursor: pointer;
    color: #e7e5d4;
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Share Tech Mono', monospace;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e7e5d4;
    background: rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.8);
    box-shadow: 
        0 0 10px rgba(255, 140, 0, 0.4),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

#modal .modal-header > .heading .close-modal:hover {
    background: rgba(255, 140, 0, 0.2);
    box-shadow: 
        0 0 20px rgba(255, 140, 0, 0.8),
        inset 0 0 20px rgba(255, 140, 0, 0.2);
    transform: scale(1.1);
}

#modal .modal-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    font-size: 1.4rem;
    color: #e0e0e0;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 400;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    max-height: 60vh;
}

#modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#modal .modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

#modal .modal-body::-webkit-scrollbar-thumb {
    background: #e7e5d4;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

#modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #ffaa00;
}

#modal .modal-footer:not(:empty) {
    border-top: 2px solid #e7e5d4;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
}

.modal-image-container {
    margin: 20px 0;
    text-align: center;
}

.modal-image {
    max-width: 100%;
    max-height: 400px;
    border: 2px solid #e7e5d4;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.5);
    border-radius: 4px;
}

.modal-audio-container {
    margin: 20px 0;
    text-align: center;
    width: 100%;
}

.modal-audio {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.modal-text {
    margin: 20px 0;
    line-height: 1.8;
    color: #e0e0e0;
}

.modal-text q {
    font-style: italic;
    display: block;
}

.modal-input-container {
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #e7e5d4;
    border-radius: 4px;
}

.modal-input-label {
    display: block;
    margin-bottom: 10px;
    color: #e7e5d4;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.modal-textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #e7e5d4;
    color: #e7e5d4;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.modal-textarea:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
}

.modal-submit-btn {
    padding: 12px 30px;
    background: rgba(255, 140, 0, 0.2);
    border: 2px solid #e7e5d4;
    color: #e7e5d4;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
}

.modal-submit-btn:hover:not(:disabled) {
    background: rgba(255, 140, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.6);
    transform: scale(1.05);
}

.modal-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(231, 229, 212, 0.3);
    border-top-color: #e7e5d4;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes errorGlow {
    0% {
        border-color: #e7e5d4;
        box-shadow: 0 0 0 rgba(255, 0, 0, 0);
    }
    50% {
        border-color: #ff4444;
        box-shadow: 0 0 20px rgba(255, 68, 68, 0.8), 0 0 40px rgba(255, 68, 68, 0.4);
    }
    100% {
        border-color: #e7e5d4;
        box-shadow: 0 0 0 rgba(255, 0, 0, 0);
    }
}

.modal-input-container.shake-error {
    animation: shake 0.5s ease-in-out;
}

.modal-textarea.error-glow {
    animation: errorGlow 1s ease-out;
}

.success-container {
    text-align: center;
    padding: 40px 20px !important;
    background: rgba(0, 255, 0, 0.1) !important;
    border-color: #00ff00 !important;
    animation: successPulse 0.6s ease-out;
}

.success-message {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2.5rem;
    font-weight: bold;
    color: #00ff00;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-shadow: 
        0 0 20px rgba(0, 255, 0, 0.8),
        0 0 40px rgba(0, 255, 0, 0.6),
        0 0 60px rgba(0, 255, 0, 0.4);
    animation: successPulse 0.6s ease-out;
    margin-bottom: 20px;
}

.success-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.4rem;
    color: #e0e0e0;
    line-height: 1.8;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 255, 0, 0.3);
    animation: fadeIn 0.8s ease-out 0.3s both;
}

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

@keyframes successPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}