/* Shared CSS file */

html,
body {
    margin: 0;
    padding: 0;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

h1 {
    color: #555;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Computer screen styles for page/0.html */
.computer-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #8b4513;
    /* Darker beige background */
}

.screen-border {
    position: relative;
    width: 80%;
    height: 80%;
    background-color: #f5f5dc;
    /* Beige border color */
    border: 20px solid #d2b48c;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.screen-header {
    height: 50px;
    background-color: #d2b48c;
    border-top: 2px solid #a0522d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buttons {
    display: flex;
    gap: 10px;
}

.button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    cursor: pointer;
}

.button.red {
    background-color: #ff0000;
}

.button.yellow {
    background-color: #ffff00;
}

.button.green {
    background-color: #00ff00;
}

.screen-iframe {
    flex: 1;
    border: none;
    border-radius: 5px 5px 0 0;
}

.stand {
    width: 20%;
    height: 15%;
    background-color: #d2b48c;
    margin: -10px auto 0;
    border-radius: 5px;
}

#start-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    position: fixed;
    bottom: 0px;

    font-weight: bold;
    padding: 2px 8px 2px 6px;
    height: 40px;
    font-size: 20px;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
    color: #000;

    background: #c0c0c0;

    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;

    box-sizing: border-box;
    cursor: default;
}

#start-button:active,
#start-button.active {
    border-top: 2px solid #404040;
    border-left: 2px solid #404040;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;

    padding: 3px 7px 1px 7px;
    /* subtle press offset */
}

/* Desktop icon styles */
.desktop-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.desktop-icon img {
    width: 32px;
    height: 32px;
    display: block;
    margin: 0 auto;
}

.desktop-icon span {
    font-size: 12px;
    color: white;
    text-shadow: 1px 1px 0px black;
    margin-top: 4px;
}

/* Window styles */
.window {
    position: absolute;
    top: 50px;
    left: 20px;
    width: 350px;
    height: 400px;
    max-width: 95vw;
    max-height: 95vh;
    background-color: #c0c0c0;
    border: 2px outset #c0c0c0;
    box-sizing: border-box;
    z-index: 1000;
}

.window-title-bar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 2px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    font-family: "MS Sans Serif", sans-serif;
    font-size: 12px;
    height: 20px;
    box-sizing: border-box;
}

.window-title {
    flex-grow: 1;
}

.window-close-btn {
    width: 20px;
    height: 18px;
    background-color: #c0c0c0;
    border: 1px outset #c0c0c0;
    color: black;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.window-close-btn:hover {
    background-color: #dfdfdf;
}

.window-close-btn:active,
.window-close-btn.pressed {
    border: 1px inset #c0c0c0;
    background-color: #b0b0b0;
}

.window-content {
    background-color: white;
    border: 1px inset #c0c0c0;
    height: calc(100% - 24px);
}

/* Popup styles */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-content {
    background-color: #c0c0c0;
    border: 2px outset #c0c0c0;
    padding: 20px;
    max-width: 300px;
    text-align: center;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
    font-size: 12px;
}

.popup-icon {
    margin-bottom: 10px;
}

.popup-icon img {
    width: 32px;
    height: 32px;
}

.popup-message {
    margin-bottom: 15px;
    color: #000;
}

.popup-ok-btn {
    padding: 4px 12px;
    background-color: #c0c0c0;
    border: 1px outset #c0c0c0;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
    font-size: 11px;
    cursor: pointer;
}

.popup-ok-btn:hover {
    background-color: #dfdfdf;
}

.popup-ok-btn:active {
    border: 1px inset #c0c0c0;
    background-color: #b0b0b0;
}


/* Help bubble styles - Windows 98 style */
.help-bubble {
    background-color: #ffffe1;
    border: 1px solid #000;
    padding: 8px 12px;
    font-family: "MS Sans Serif", sans-serif;
    font-size: 11px;
    max-width: 280px;
    border-radius: 3px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    margin-bottom: 15px;
}

.help-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 80px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #000;
}

.help-bubble::after {
    content: '';
    position: absolute;
    top: -6px;
    right: 81px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #ffffe1;
}

/* Diary entry styles */
.diary-entry {
    font-family: 'Courier New', monospace;
    line-height: 1.2;
    margin-bottom: 20px;
}

.diary-entry b {
    font-size: 1.1em;
    display: inline;
}

.diary-entry p {
    margin-bottom: 10px;
}

.diary-entry::after {
    content: ".-\"-.     .-\'-.     .-\'-. \A      \"-.-\"     \"-.-\"     \"-.-\"";
    white-space: pre;
    display: block;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #666;
}

/* DOS-style input field */
.win98-input {
    background: #000080;
    /* Classic DOS blue */
    border: 1px solid #ffffff;
    /* White border */
    padding: 4px 6px;
    font-family: 'Courier New', monospace;
    /* DOS monospace font */
    font-size: 12px;
    font-weight: normal;
    color: #c0c0c0;
    /* Light gray text */
    box-sizing: border-box;
    outline: none;
    width: 100%;
    /* Fit container but not too wide */
    max-width: 100px;
    /* Limit width to fit half table */
    height: 20px;
    line-height: 1;
    box-shadow: none;
    /* DOS style all caps */
}

.win98-input::placeholder {
    color: #808080;
    /* Darker gray for placeholder */
    text-transform: uppercase;
}

.win98-input:focus {
    background: #0000a0;
    /* Slightly lighter blue when focused */
    border: 1px solid #ffff00;
    /* Yellow border when focused */
    color: #ffffff;
    /* White text when focused */
}

/* Add streamer container */
.add-streamer-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* Game animations */
@keyframes emojiBlink {
    0% {
        transform: rotate(-20deg);
    }

    50% {
        transform: rotate(20deg);
    }

    100% {
        transform: rotate(-20deg);
    }
}

@keyframes valueFeedback {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes attFeedback {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    20% {
        opacity: 1;
        transform: translateY(-20px);
    }

    100% {
        opacity: 0;
        transform: translateY(-40px);
    }
}

@keyframes collabGrow {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(2);
    }
}


.highlight-text {
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    position: relative;
    display: inline-block;
    animation: rainbow-text 3s linear infinite, gentle-sway 4s ease-in-out infinite;
    background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080, #ff0000);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 1px 1px 0px #000000AA, 0 0 10px rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.highlight-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shine 2s infinite;
}

.highlight-text::after {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    animation: sparkle-float 3s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes rainbow-text {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes gentle-sway {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(2deg);
    }

    75% {
        transform: rotate(-2deg);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes sparkle-float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg) scale(0.8);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-3px) rotate(180deg) scale(1.2);
        opacity: 1;
    }
}


.next-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #c0c0c0;
    border: 2px outset #c0c0c0;
    padding: 8px 16px;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    font-size: 14px;
    font-family: "MS Sans Serif", sans-serif;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
    margin-top: 20px;
    animation: pulsate 2s ease-in-out infinite;
}

@keyframes pulsate {

    0%,
    100% {
        transform: scale(1);
        background-color: #c0c0c0;
    }

    50% {
        transform: scale(1.05);
        background-color: #d4d4a0;
    }
}

.next-button:hover {
    background-color: #dfdfdf;
    border: 2px inset #c0c0c0;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.next-button:active {
    border: 2px inset #c0c0c0;
    padding: 9px 15px 7px 17px;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.next-button img {
    width: 24px;
    height: 24px;
}

/* Achievement popup styles */
.achievement-popup {
    position: fixed;
    bottom: -120px;
    right: 5px;
    width: 180px;
    background-color: #c0c0c0;
    border: 2px outset #c0c0c0;
    padding: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: "MS Sans Serif", sans-serif;
    z-index: 3000;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: achievement-rise 5s ease-in-out;
}

.achievement-popup.show {
    animation: achievement-rise 5s ease-in-out;
}

@keyframes achievement-rise {
    0% {
        bottom: -120px;
        opacity: 0;
    }

    15% {
        bottom: 5px;
        opacity: 1;
    }

    85% {
        bottom: 5px;
        opacity: 1;
    }

    100% {
        bottom: -120px;
        opacity: 0;
    }
}

.achievement-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.achievement-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.achievement-header {
    font-size: 10px;
    font-weight: normal;
    color: #666;
    text-align: center;
    margin-bottom: 2px;
}

.achievement-text {
    font-size: 12px;
    font-weight: bold;
    color: #000;
    word-wrap: break-word;
    line-height: 1.2;
}