/* Add these at the very top of your CSS file, after the :root selector */
:root {
    --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>🤚</text></svg>") 16 0, pointer;
    --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>👆</text></svg>") 16 0, pointer;
    --cursor-grab: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>👋</text></svg>") 16 0, grab;
    --cursor-text: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>✍️</text></svg>") 16 0, text;
    --cursor-wait: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>👌</text></svg>") 16 0, wait;
    --cursor-not-allowed: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>🖕</text></svg>") 16 0, not-allowed;
}

/* Then replace all the individual cursor styles with these global rules */
* {
    cursor: var(--cursor-default);
}

a, button, [role="button"], .clickable {
    cursor: var(--cursor-pointer);
}

[data-draggable], .draggable {
    cursor: var(--cursor-grab);
}

input, textarea, [contenteditable="true"] {
    cursor: var(--cursor-text)
}

.loading, [aria-busy="true"] {
    cursor: var(--cursor-wait);
}

.disabled, [disabled], [aria-disabled="true"] {
    cursor: var(--cursor-not-allowed);
}
body {
    background-color: #FF00FF;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AkEEjIXY+2x1QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAJklEQVQ4y2NgGAXDADH+/x8dYxTDMQwjY4xiOIZhZIxRDMfAAADXpQioy1QYJAAAAABJRU5ErkJggg==');
    font-family: "MS PGothic", "Comic Sans MS", sans-serif;
    color: lime;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    cursor: var(--cursor-default);
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(0,0,0,0.7);
    border: 10px dotted yellow;
    padding: 20px;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: clamp(40px, 8vw, 72px);
    text-shadow: 5px 5px 0 red, -5px -5px 0 blue;
    text-align: center;
    margin: 10px 0;
    animation: blink 1s infinite;
}

p {
    margin: 20px 10px;
    color: lime;
}
a {
    color: lime;
    margin: 20px 10px;
}
.group {
    margin-top: 30px;
}
.marquee {
    background: black;
    color: white;
    padding: 10px;
    font-size: clamp(16px, 3vw, 24px);
    border-top: 3px dashed red;
    border-bottom: 3px dashed red;
    margin: 20px 0;
    overflow: hidden;
}

.emoji {
    position: fixed;
    font-size: 2rem;
    user-select: none;
    z-index: 0;
    transition: transform 0.1s linear;
}

.beer {
    color: #FFD700;
}

.cigarette {
    color: white;
}

.dancer {
    color: #FF0000;
}

.cool {
    color: #000000;
    text-shadow: 0 0 5px yellow;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.counter {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: black;
    color: lime;
    padding: 5px;
    border: 2px solid red;
    font-family: "Courier New", monospace;
    z-index: 2;
}

.guestbook {
    background: rgba(255,0,255,0.3);
    padding: 10px;
    margin-top: 20px;
    border: 3px groove cyan;
}

.blink {
    animation: blink 1s infinite;
}

.rotate {
    animation: spin 5s infinite linear;
}

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

.bounce {
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.smooth-marquee span:hover {
animation-play-state: paused;
cursor: pointer;
}
.smooth-marquee {
width: 100%;
overflow: hidden;
background: black;
color: white;
border-top: 3px dashed red;
border-bottom: 3px dashed red;
padding: 10px 0;
position: relative;
height: 2.5em; /* Adjust as needed */
}

.smooth-marquee span {
display: inline-block;
white-space: nowrap;
padding-left: 100%;
animation: marquee 20s linear infinite;
font-size: clamp(16px, 3vw, 24px);
}

@keyframes marquee {
0%   { transform: translateX(0); }
100% { transform: translateX(-100%); }
}
.bastards-list {
background: rgba(0,0,0,0.7);
padding: 20px;
margin-top: 20px;
border: 3px groove cyan;
max-width: 800px;
margin-left: auto;
margin-right: auto;
}

.bastards-list ol {
list-style: decimal inside;
padding: 0;
}

.bastard-card {
display: flex;
align-items: flex-start;
background: rgba(255,0,255,0.1);
margin: 15px 0;
padding: 10px;
border: 2px dashed yellow;
border-radius: 10px;
}

.bastard-img {
width: 80px;
height: 80px;
object-fit: cover;
border-radius: 8px;
margin-right: 15px;
border: 2px solid magenta;
}

.bastard-info h3 {
margin: 0 0 5px 0;
color: lime;
}

.bastard-category {
display: inline-block;
background: black;
color: cyan;
border: 1px solid yellow;
border-radius: 4px;
padding: 2px 8px;
font-size: 0.9em;
margin-bottom: 5px;
}

.bastard-info p {
margin: 5px 0 0 0;
color: white;
}
.japan-nav {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #fffd82 0%, #ff6363 100%);
    border: 4px solid #1a2236;
    border-radius: 16px;
    color: #222;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.4);
    transition: width 0.3s, height 0.3s, background 0.3s;
    overflow: hidden;
    min-width: 40px;
}

.japan-nav.folded {
    width: 48px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffe600 0%, #ff6363 100%);
}

.japan-nav.unfolded {
    width: 240px;
    height: auto;
    padding: 20px 0;
    display: block;
    background: linear-gradient(135deg, #fff700 0%, #00eaff 100%);
    border-color: #0a0a23;
}

.japan-nav .menu-toggle,
.japan-nav .menu-items a {
    width: 100%;
    text-align: center;
    font-size: 2.2em;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>👆</text></svg>") 16 0, pointer;
    user-select: none;
    color: #0a0a23;
    background: none;
    border: none;
    outline: none;
    padding: 10px 0;
    font-family: 'Noto Sans JP', 'MS PGothic', sans-serif;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 0 #fff, 0 0 8px #ffe600;
}

.japan-nav .menu-items {
    display: none;
    flex-direction: column;
    align-items: flex-start;
}

.japan-nav.unfolded .menu-items {
    display: flex;
    align-items: center;
}

.japan-nav .menu-items a {
    color: #ff1e56;
    background: #fff700;
    border: 2px solid #0a0a23;
    border-radius: 8px;
    font-family: 'Noto Sans JP', 'MS PGothic', sans-serif;
    font-size: 1.3em;
    padding: 8px 24px;
    margin-bottom: 4px;
    text-decoration: none;
    box-shadow: 2px 2px 0 #0a0a23, 0 0 8px #ffe600;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    letter-spacing: 0.08em;
    text-shadow: 1px 1px 0 #fff, 0 0 6px #ffe600;
}

.japan-nav .menu-items a:hover {
    background: #ff6363;
    color: #fff700;
    transform: scale(1.08) rotate(-2deg);
    border-color: #ff1e56;
    box-shadow: 0 0 16px #ff6363, 2px 2px 0 #0a0a23;
}

#drift-container {
    position: fixed;
    left: 50vw;
    top: 80vh;
    transform: translate(-50%, -50%);
    z-index: 2000;
  }
  
  #drift-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffe600 0%, #00eaff 100%);
    border: 5px solid #ff1e56;
    color: #1a2236;
    font-size: 3rem;
    font-family: 'MS PGothic', 'Comic Sans MS', sans-serif;
    box-shadow: 0 0 24px #ffe600, 0 0 8px #00eaff, 0 4px 16px #0008;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>��</text></svg>") 16 0, grab;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    outline: none;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 0 #fff, 0 0 8px #ff1e56;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  #drift-btn.spinning {
    animation: drift-spin 0.4s linear infinite;
    box-shadow: 0 0 32px #ff1e56, 0 0 16px #00eaff, 0 4px 24px #0008;
  }
  
  @keyframes drift-spin {
    100% { transform: rotate(360deg); }
  }
  
  #drift-message {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
    font-family: 'MS PGothic', 'Comic Sans MS', sans-serif;
    color: #fff700;
    font-size: 1em;
    background: linear-gradient(135deg, #ff1e56 0%, #00eaff 100%);
    border: 5px solid #ffe600;
    border-radius: 24px;
    padding: 14px 24px;
    box-shadow: 0 0 32px #ff1e56, 0 0 16px #00eaff, 0 4px 24px #0008;
    display: none;
    text-align: center;
    letter-spacing: 0.12em;
    text-shadow: 2px 2px 0 #000, 0 0 12px #ffe600;
    font-weight: bold;
    text-transform: uppercase;
  }

  body, body * {
    user-select: none !important;
    -webkit-user-select: none !important; /* Safari */
    -ms-user-select: none !important;     /* IE10+/Edge */
  }
  
  img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
  }
  input, textarea {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>✍️</text></svg>") 16 0, text;
}

.loading {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>��</text></svg>") 16 0, wait;
}

.disabled {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>✋</text></svg>") 16 0, not-allowed;
}
/* Grid layout for index page */
body.index-page .japan-nav {
    position: unset;
    background: linear-gradient(135deg, #fffd82 0%, #ff6363 100%);
    border: 4px solid #1a2236;
    border-radius: 16px;
    color: #222;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    transition: width 0.3s, height 0.3s, background 0.3s;
    overflow: hidden;
    min-width: 40px;
}

body.index-page .japan-nav.folded {
    margin-top: 40px;
    width: unset;
    height: unset;
    background: linear-gradient(135deg, #ffe600 0%, #ff6363 100%);
}
body.index-page .japan-nav .menu-toggle {
 display: none;
}
body.index-page .japan-nav .menu-items {
    display: flex;
    justify-items: center;
    align-items: center;
}


/* Main Board Container - Now with containment */
.fucked-up-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    padding: 30px;
    background-color: #000;
    background-image: 
      linear-gradient(rgba(255, 0, 255, 0.1) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 0, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 100vh;
    position: relative; /* Added for containment */
    overflow: hidden; /* Prevents notes from escaping */
  }
  
  /* Base Sticky Note Style with max-height and containment */
  .sticky-note {
    padding: 20px;
    min-height: 180px;
    max-height: 200px; /* Added max-height */
    position: relative;
    box-shadow: 8px 8px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: move; /* Changed to move cursor */
    overflow: hidden;
    font-family: 'MS Gothic', 'Courier New', monospace;
    transform: rotate(-1deg);
    touch-action: none; /* For better drag handling */
    will-change: transform; /* Optimizes animations */
    contain: layout; /* Improves performance */
  }
  
  /* Dragging state */
  .sticky-note.dragging {
    z-index: 100;
    box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.5);
    transition: none; /* Disable smooth movement during drag */
  }
  
  /* Sticky Note Color Variations */
  .sticky-note:nth-child(5n+1) {
    background: #FFFF99;
    border-color: #FFCC00;
  }
  
  .sticky-note:nth-child(5n+2) {
    background: #FFCCCC;
    border-color: #FF6699;
    transform: rotate(2deg);
  }
  
  .sticky-note:nth-child(5n+3) {
    background: #CCFFCC;
    border-color: #66CC99;
    transform: rotate(-3deg);
  }
  
  .sticky-note:nth-child(5n+4) {
    background: #CCCCFF;
    border-color: #6699FF;
    transform: rotate(1deg);
  }
  
  .sticky-note:nth-child(5n+5) {
    background: #FFCC99;
    border-color: #FF9966;
    transform: rotate(-2deg);
  }
  
  /* Hover Effect */
  .sticky-note:hover:not(.dragging) {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 12px 12px 15px rgba(0, 0, 0, 0.4);
  }
  
  /* Content styles remain the same */
  .sticky-note .note-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.3);
    color: #FF0099;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .sticky-note .note-text {
    font-size: 0.9em;
    line-height: 1.5;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 100px; /* Adjust based on your max-height */
  }
  
  .sticky-note .note-nickname {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.8em;
    font-weight: bold;
    color: #660099;
    background: rgba(255, 255, 255, 0.7);
    padding: 3px 8px;
    border-radius: 10px;
  }
  
  .sticky-note .sticky-label {
    position: absolute;
    top: 10px;
    right: -5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 10px;
    font-size: 0.7em;
    transform: rotate(10deg);
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
  }
         /* Popup Overlay */
         .popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        
        /* Popup Content */
        .popup-content {
            background-color: #111;
            border: 3px solid #FF00FF;
            padding: 25px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 0 20px #FF00FF;
            position: relative;
        }
        
        .popup-title {
            color: #FFFF00;
            text-align: center;
            font-size: 24px;
            margin-bottom: 20px;
            border-bottom: 2px dashed #00FFFF;
            padding-bottom: 10px;
        }
        
        .close-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: none;
            border: none;
            color: #FF00FF;
            font-size: 20px;
            cursor: pointer;
        }
        
        /* Form Styles */
        .form-group {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            color: #00FF00;
        }
        
        input, textarea {
            background-color: #222;
            border: 1px solid #FF00FF;
            color: #00FFFF;
            width: 100%;
            padding: 10px;
            font-family: 'MS Gothic', 'Courier New', monospace;
        }
        
        textarea {
            min-height: 120px;
            resize: vertical;
        }
        
        .char-counter {
            font-size: 12px;
            color: #FF00FF;
            text-align: right;
            margin-top: 5px;
        }
        
        .submit-btn {
            background-color: #FF00FF;
            color: #000;
            border: none;
            padding: 12px 25px;
            font-weight: bold;
            cursor: pointer;
            font-family: 'MS Gothic', 'Courier New', monospace;
            width: 100%;
            font-size: 16px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .submit-btn:hover {
            background-color: #FFFF00;
            color: #FF00FF;
        }
        
        /* Open Button */
        .open-form-btn {
            background-color: #FF00FF;
            color: #000;
            border: none;
            padding: 5px 30px;
            font-weight: bold;
            height: 40px;
            cursor: pointer;
            font-family: 'MS Gothic', 'Courier New', monospace;
            position: fixed;
            bottom: 30px;
            right: 30px;
            font-size: 18px;
            box-shadow: 0 0 10px #FF00FF;
            z-index: 100;
            position: unset !important;
        }
        
        .open-form-btn:hover {
            background-color: #FFFF00;
            color: #FF00FF;
        }
        
        /* Japanese Decoration */
        .japanese-decoration {
            position: absolute;
            font-size: 12px;
            color: rgba(255, 0, 255, 0.5);
        }
        
        .decoration-1 {
            top: 5px;
            left: 5px;
            transform: rotate(-15deg);
        }
        
        .decoration-2 {
            bottom: 5px;
            right: 5px;
            transform: rotate(15deg);
        }
        .fucked-up-group {
            display: flex;
            gap: 20px;
            align-items: center;
        }
        .shit-post-title {
            text-shadow: unset;
            animation: unset;
            font-size: 18px;
            color: black;
        }
        