.closebutton {
    width: 12px;
    height: 12px;
    cursor: pointer;
    background-color: #ff0000;
    border-radius: 16px;
    border: 3px solid rgb(255, 0, 0);
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    pointer-events:auto;
}

.desktop-app-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 84px 20px 20px;
    flex-wrap: wrap;
}

.desktop-icon {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 6px;
    width: 72px;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.desktop-icon:hover,
.desktop-icon.selected {
    background-color: rgba(255, 255, 255, 0.14);
}

.desktop-icon img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.desktop-icon p {
    margin: 0;
    color: #fff;
    font-size: 15px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.window {
    border-style: solid;
    border-radius: 16px;
    width: 300px;
    min-width: 200px;
    min-height: 120px;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: absolute;
    backdrop-filter: blur(10px);
    background-color: white;
    opacity: 0.80;
    overflow: hidden;
}

.window-content {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    background-color: white;
}

#notesArea {
    width: 100%;
    height: 100%;
    flex: 1;
    resize: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    box-sizing: border-box;
}

#gameField {
    margin-top: 12px;
    position: relative;
    width: 100%;
    height: 190px;
    background: radial-gradient(circle at top, #1e2d6b 0%, #060816 70%, #02030a 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.game-token {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
    animation: floatIn 0.3s ease;
}

.game-token.shard {
    background: radial-gradient(circle, #fff7b5 0%, #ffd95d 45%, #ff8c00 100%);
    color: #5b2b00;
}

.game-token.comet {
    background: radial-gradient(circle, #d1c2ff 0%, #6d4cff 45%, #230d4d 100%);
    color: #fff;
}

.game-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    opacity: 0.75;
    animation: twinkle 1.8s infinite ease-in-out;
}

@keyframes floatIn {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes twinkle {
    0%, 100% { transform: scale(1); opacity: 0.45; }
    50% { transform: scale(1.6); opacity: 0.95; }
}

.titlebar {
    width: 100%;
    height: 28px;
    background: rgba(255, 255, 255, 0);
    position: absolute;
    top: 0;
    left: 0;
    cursor: move;
    border-radius: 8px 8px 0 0;
    z-index: 10;
}

.drag-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 6px solid transparent;
    box-sizing: border-box;
    cursor: move;
    z-index: 1;
    pointer-events: auto;
}

.calculator {
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.display {
   width: 100%;
   height: 50px;
   font-size: 1.5rem;
   padding: 10px;
   box-sizing: border-box;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    width: 100%;
    flex: 1;
    box-sizing: border-box;
}

.button {
    background-color: #fa8703;
    font-size: 1.5rem;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.3s, transform 0.2s;
    color: white;
    width: 100%;
    box-sizing: border-box;
}

.button:hover {
    background-color: #0288d1;
    transform: scale(1.1);
}

.button:active {
    transform: scale(0.95);
}

.button.clear {
    background-color: #ff5722;
}

.button.clear:hover {
    background-color: #e64a19;
}

.button.equal {
    background-color: #8bc34a;
}

.button.equal:hover {
    background-color: #f57c00;
}

.resize-handle {
    position: absolute;
    background: transparent;
    z-index: 1;
}

.resize-n {
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
}

.resize-s {
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
}

.resize-e {
    right: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
}

.resize-w {
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
}

.resize-nw {
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    cursor: nwse-resize;
}

.resize-ne {
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    cursor: nesw-resize;
}

.resize-sw {
    bottom: 0;
    left: 0;
    width: 12px;
    height: 12px;
    cursor: nesw-resize;
}

.resize-se {
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    cursor: nwse-resize;
}

.splash {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    height: 100%;
    background-color: transparent;
    cursor: pointer;
    z-index: 999999;
    transition: all ease-in-out 1000ms;
    overflow: hidden;
    pointer-events: auto;
}

.hidden {
    transition: 0.5s;
    display: none;
    pointer-events: none;
    z-index: 0;
}
.splash-header {
    color: white;
    font-family: consolas;
    font-size: 48px;
    margin: 0;
    z-index: 1;
}

.splash-subheader {
    color: white;
    font-family: consolas;
    font-size: 20px;
    margin: 0;
    opacity: 0.95;
    z-index: 1;
    animation: flash 3s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.splash-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: -1;
}

html, body {
    height: 100%;
    overflow: hidden;
    margin: 0;
}

#background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#blackHole {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #000 40%, #0a0a2a 70%, transparent 100%);
    box-shadow: 0 0 40px 20px rgba(0, 0, 0, 0.7);
    animation: spin 4s linear infinite;
    z-index: 9999;
    pointer-events: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: particleFly 0.8s ease-out forwards;
}

@keyframes particleFly {
    from { transform: translate(0, 0); opacity: 1; }
    to { transform: translate(60px, -40px); opacity: 0; }
}