/* ============================================================================
   SATA ANDAGI CLICKER - UNIFIED OLD-SCHOOL DESIGN SYSTEM
   High Contrast, Sharp Edges, Retro Aesthetic
   ============================================================================ */

body {
    text-align: center;
    font-family: 'Courier New', monospace;
    position: relative;
    overflow-y: auto;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    min-height: 100vh;
    flex-direction: column;
    color: white;
    background: url('../../assets/images/background.jpg') no-repeat center center/cover;
    background-size: cover;
    touch-action: manipulation;
    margin: 0;
    padding: 0 0 0 0;
    /* High contrast backdrop */
    background-color: #000000;
}

body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
    background-size: cover;
}

.header-bar {
    width: 100%;
    height: 60px;
    background-color: #FFFF00;
    color: #000000;
    border-bottom: 5px solid #000000;
    padding: 0 10px;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    min-height: 60px;
    max-height: 60px;
    z-index: 1000;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    overflow: visible;
}

.header-bar .left-buttons-container {
    display: flex;
    gap: 24px;
    align-items: center;
    height: 100%;
    justify-content: flex-start;
    flex: 0 0 auto;
}

.header-bar .left-buttons-container > div {
    min-width: 140px;
    max-width: 180px;
    height: 34px;
    text-align: center;
    padding: 0;
    margin: 0;
    font-size: 15px;
    border-radius: 0;
    box-shadow: 3px 3px 0px #000;
    border: 3px solid #000;
    background: #000;
    color: #FFFF00;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.1s, color 0.1s, box-shadow 0.1s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    position: relative;
    top: 0;
}

.header-bar .left-buttons-container > div:hover {
    background: #333;
    color: #fff;
    box-shadow: 2px 2px 0px #000;
}

.header-bar .web3-header {
    display: none;
}

.header-bar .top-right-buttons-container {
    display: flex;
    gap: 24px;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-right: 24px;
}

/* --- Header Button Consistency --- */
.web3-button, .top-right-button, .connect-metamask {
    min-width: 150px;
    height: 40px;
    font-size: 15px;
    padding: 0 18px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove double border on connect-metamask */
.connect-metamask {
    border-width: 3px !important;
}

.click-btn {
    cursor: pointer;
    width: 150px;
    transition: none; /* Remove smooth transitions for old-school feel */
    touch-action: manipulation;
    border: 5px solid #FFFF00;
    box-shadow: 5px 5px 0px #000000;
}

.click-btn:active {
    transform: translate(2px, 2px) !important;
    box-shadow: 3px 3px 0px #000000 !important;
    border-color: red !important;
}

.click-btn:hover {
    box-shadow: 7px 7px 0px #000000;
    transform: translate(-2px, -2px);
}

.message {
    position: absolute;
    font-size: 48px;
    font-weight: bold;
    color: white;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 2s ease-in-out;
    z-index: 1000;
}

/* Universal Button Styles - Old-School, High Contrast, Sharp Edges */
button, .button, input[type="button"], input[type="submit"], .btn, .connect-btn, 
.reset-button, .claim-button, .web3-button, .top-right-button, .volume-control-button,
.hide-gif-button, .connect-metamask, a.install-btn {
    background-color: #007bff;
    color: white;
    border: 3px solid black;
    border-radius: 0;
    padding: 5px 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 3px 3px 0px #000000;
    z-index: 10;
}

/* Unified Close Button Style */
.close {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    padding: 5px 8px;
    z-index: 10;
    background-color: #007bff;
    color: white;
    border: 3px solid black;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 3px 3px 0px #000000;
    cursor: pointer;
    transition: background 0.1s, color 0.1s, box-shadow 0.1s;
    display: inline-block;
    margin: 2px;
    text-align: center;
    text-decoration: none;
    letter-spacing: 1px;
}

button:hover, .button:hover, input[type="button"]:hover, input[type="submit"]:hover,
.btn:hover, .connect-btn:hover, .reset-button:hover, .claim-button:hover, 
.web3-button:hover, .top-right-button:hover, .volume-control-button:hover,
.hide-gif-button:hover, .connect-metamask:hover, a.install-btn:hover {
    background-color: #0056b3;
    box-shadow: 2px 2px 0px #000000;
    transform: translate(1px, 1px);
}

.close:hover {
    background-color: #0056b3;
    box-shadow: 2px 2px 0px #000000;
    color: #fff;
    transform: translate(1px, 1px);
}

button:active, .button:active, input[type="button"]:active, input[type="submit"]:active,
.btn:active, .connect-btn:active, .reset-button:active, .claim-button:active, 
.web3-button:active, .top-right-button:active, .volume-control-button:active,
.hide-gif-button:active, .connect-metamask:active, a.install-btn:active {
    background-color: #004494;
    box-shadow: 1px 1px 0px #000000;
    transform: translate(2px, 2px);
}

.close:active {
    background-color: #004494;
    box-shadow: 1px 1px 0px #000000;
    transform: translate(2px, 2px);
}

/* Specific Button Color Variants */
.reset-button, .danger-button {
    background-color: #dc3545;
}

.reset-button:hover, .danger-button:hover {
    background-color: #c82333;
}

.success-button, .claim-button {
    background-color: #28a745;
}

.success-button:hover, .claim-button:hover {
    background-color: #218838;
}

.warning-button {
    background-color: #ffc107;
    color: black;
}

.warning-button:hover {
    background-color: #e0a800;
}

.web3-button, .connect-btn {
    background-color: #6f42c1;
}

.web3-button:hover, .connect-btn:hover {
    background-color: #5a32a3;
}

.connect-metamask {
    background-color: #6f42c1 !important;
}

.connect-metamask:hover {
    background-color: #5a32a3 !important;
}

/* Header buttons */
.top-right-button {
    background-color: #17a2b8;
}

.top-right-button:hover {
    background-color: #138496;
}

.video-container {
    margin-top: 10px;
    width: 560px;
    height: 315px;
}

.developer-notes, .credits, .to-do-list, .socials, .help, .info, .show-gif {
    font-style: normal;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    background-color: #000000;
    color: #FFFF00;
    font-weight: bold;
    font-size: 12px;
    padding: 8px 12px;
    border: 3px solid #000000;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 2px 2px 0px #333333;
}

.developer-notes:hover, .credits:hover, .to-do-list:hover, .socials:hover, .help:hover, .info:hover, .show-gif:hover {
    background-color: #333333;
    color: #FFFFFF;
    box-shadow: 1px 1px 0px #333333;
    transform: translate(1px, 1px);
}

#socialsPopup .social-link {
    margin-bottom: 10px;
    width: 100%;
    text-align: center; 
}

#socialsPopup .social-link a {
    display: inline-block;
    text-decoration: none;
    color: white;
    padding: 10px;
}

#socialsPopup .social-link a i {
    margin-right: 8px; 
}

.popup {
    display: none;
    position: absolute; /* Absolute position so boxes move with scroll */
    top: 50px;
    left: 10px;
    background: #000000;
    color: #FFFF00;
    padding: 30px 20px 20px 20px; /* Extra top padding for close button */
    border: 5px solid #FFFF00;
    z-index: 1005;
    width: 250px;
    cursor: default;
    overflow: auto;
    pointer-events: auto;
    box-shadow: 5px 5px 0px #333333;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.popup p {
    margin-top: 25px;
    margin-bottom: 25px;
}

.gif-container {
    position: fixed;
    bottom: 50px;
    left: 10px;
    z-index: 10000; /* Always on top (but below loading screen at 20000) */
}

.gif {
    width: 200px;
    height: auto;
    display: none; /* Hidden by default */
}

.hide-gif-button {
    position: absolute;
    top: 0;
    right: 0;
    display: none; /* Hidden by default */
    /* Inherits from universal button styles */
}

.running-text {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #000000;
    color: #FFFF00;
    border-top: 5px solid #FFFF00;
    white-space: nowrap;
    overflow: hidden;
    font-size: 24px;
    height: 40px;
    display: flex;
    align-items: center;
    z-index: 1002;
    font-family: 'Courier New', monospace;
}

.running-text .marquee-container {
    display: flex;
    animation: marquee-scroll 25s linear infinite;
}

.running-text .marquee-text {
    flex-shrink: 0;
    padding-right: 2em;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000000;
    white-space: nowrap;
    letter-spacing: 2px;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.volume-control-container {
    display: none;
    position: absolute; /* Changed from fixed to absolute */
    /* Remove top, left, and transform for JS positioning */
    background-color: #000000;
    color: #FFFF00;
    padding: 20px;
    border: 5px solid #FFFF00;
    z-index: 1004;
    width: 320px;
    box-sizing: border-box;
    box-shadow: 5px 5px 0px #333333;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.volume-control {
    margin: 10px 0;
    width: calc(100% - 100px);
    display: inline-block;
    vertical-align: middle;
}

.volume-label {
    font-size: 14px;
    margin-right: 10px;
    font-weight: bold;
    display: inline-block;
    vertical-align: middle;
}

.volume-input {
    width: 40px;
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
}

.volume-unit {
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
}


.volume-control-button {
    margin-top: 10px;
    margin-bottom: 10px; /* Extra margin to avoid running text overlap */
    position: relative;
}

#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #FFFF00;
    font-size: 24px;
    z-index: 20000;
    transition: opacity 0.5s ease;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#continueButton {
    display: none;
    margin-top: 20px;
    padding: 15px 30px;
    background-color: #007bff;
    color: white;
    border: 3px solid black;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 3px 3px 0px #000000;
}

#continueButton:hover {
    background-color: #0056b3;
    box-shadow: 2px 2px 0px #000000;
    transform: translate(1px, 1px);
}

#continueButton:active {
    background-color: #004494;
    box-shadow: 1px 1px 0px #000000;
    transform: translate(2px, 2px);
}

.container {
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 5px solid #FFFF00;
    box-shadow: 5px 5px 0px #333333;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 100;
}

#draggableBox {
    position: fixed; /* Fixed position so not affected by scrolling */
    top: 100px;  /* Lower starting position to avoid header */
    right: 10px; /* Position on right side to avoid main content */
    width: 250px;
    padding: 30px 20px 20px 20px; /* Extra top padding for close button */
    background-color: #000000;
    color: #FFFF00;
    border: 5px solid #FFFF00;
    cursor: grab;
    box-shadow: 5px 5px 0px #333333;
    user-select: none;
    z-index: 1005;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    color: #FFFF00;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    text-align: center;
    padding: 20px;
    pointer-events: all;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-overlay p {
    margin: 0 20px;
    word-wrap: break-word;
}

.mobile-overlay img {
    margin-top: 20px;
    width: 200px;
    height: auto;
}

.fun-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.fun-gif {
    width: 300px;
    height: auto;
}

@media (max-width: 768px) {
    .header-bar {
        height: auto;
        min-height: 60px;
        flex-direction: column;
        gap: 5px;
        padding: 5px;
    }

    .click-btn {
        width: 100px;
    }

    .message {
        font-size: 36px;
    }

    .reset-button {
        font-size: 14px;
    }

    .video-container {
        width: 100%;
        height: auto;
    }

    .gif {
        width: 150px;
    }    .running-text {
        font-size: 18px;
        height: 30px;
    }

    .volume-control-container {
        width: 90%;
    }

    .mobile-overlay {
        display: flex;
    }

    body {
        overflow: hidden;
    }

    .web3-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .web3-button {
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .header-bar {
        height: auto;
        min-height: 60px;
        flex-direction: column;
        gap: 5px;
        padding: 5px;
    }
    
    .left-buttons-container {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .top-right-buttons-container {
        justify-content: center;
        margin: 0;
    }
    
    body {
        padding-top: 80px;
    }
    
    .token-counter {
        margin: 5px;
        padding: 8px;
        font-size: 12px;
    }
    
    .wallet-modal .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 15px;
    }
    
    .token-notification, .transaction-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 80px;
    }
}

@media (max-width: 900px) {
  .header-bar {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    /* Hide default scrollbar, show custom below */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
  }
  .header-bar::-webkit-scrollbar {
    height: 8px;
    background: #000;
  }
  .header-bar::-webkit-scrollbar-thumb {
    background: #FFFF00;
    border-radius: 0;
    border: 2px solid #000;
  }
  .header-bar::-webkit-scrollbar-track {
    background: #000;
  }
  .header-bar {
    /* Always show scrollbar at bottom */
    box-shadow: 0 8px 0 0 #000000 inset;
  }
  .header-bar {
    min-width: 600px;
  }
  .header-bar .left-buttons-container,
  .header-bar .top-right-buttons-container,
  .header-bar .web3-header {
    flex-shrink: 0;
  }
}

.header-bar::-webkit-scrollbar {
  display: none;
}

@media (max-width: 900px) {
  .header-bar::-webkit-scrollbar {
    display: block;
  }
}

/* --- MAIN PAGE SCROLLABLE AREA --- */
.main-scroll-area {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: absolute;
    top: 60px; /* height of header-bar */
    bottom: 45px; /* height of running-text/footer + the outline */
    left: 0;
    right: 0;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    /* Hide scrollbar for Chrome, Edge, Safari */
    scrollbar-width: thin;
    scrollbar-color: #FFFF00 #222;
    padding: 0 0 0 0; /* Padding to avoid content touching edges */
}

.main-scroll-area::-webkit-scrollbar {
    width: 10px;
    background: #222;
}

.main-scroll-area::-webkit-scrollbar-thumb {
    background: #FFFF00;
    border-radius: 0;
    border: 2px solid #000;
}

/* Prevent body from scrolling when main-scroll-area is present */
body.has-main-scroll {
    overflow: hidden !important;
}

header, .header-bar, .running-text {
    overflow: visible !important;
}

@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.confetti {
    position: fixed;
    top: 0;
    width: 10px;
    height: 10px;
    background-color: red;
    opacity: 0;
    animation: confetti-fall 3s linear forwards;
    z-index: 1001;
    animation-timing-function: ease-in-out;
    animation-delay: calc(var(--i) * 0.1s);
    left: calc(var(--i) * 10%);
}

.click-text {
    margin: 10px 0;
    font-size: 16px;
    color: #FFFF00;
    cursor: pointer;
    pointer-events: auto;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0px #000000;
}

.click-text:hover {
    color: #FFFFFF;
    text-shadow: 2px 2px 0px #333333;
}

/* Enhanced draggable element effects - OLD SCHOOL HARD SHADOWS */
.popup {
    transition: none; /* Remove smooth transitions for old-school feel */
    box-shadow: 5px 5px 0px #333333;
}

.popup:hover {
    box-shadow: 7px 7px 0px #333333;
    transform: translate(-2px, -2px);
}

.popup:active {
    box-shadow: 3px 3px 0px #333333;
    transform: translate(2px, 2px);
    border-color: red !important;
}

/* Physics interaction visual feedback - HARD SHADOWS ONLY */
@keyframes collision-flash {
    0% { box-shadow: 5px 5px 0px #FFFF00; border: 5px solid #FFFF00; }
    50% { box-shadow: 7px 7px 0px #FF8800; border: 5px solid #FF8800; }
    100% { box-shadow: 5px 5px 0px #333333; border: 5px solid #FFFF00; }
}

.collision-effect {
    animation: collision-flash 0.3s ease-out;
}

/* Bounce effect for wall collisions - HARD EDGE STYLE */
@keyframes wall-bounce {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(2deg); box-shadow: 8px 8px 0px #333333; }
    100% { transform: scale(1) rotate(0deg); box-shadow: 5px 5px 0px #333333; }
}

.wall-bounce {
    animation: wall-bounce 0.2s ease-out;
}

/* Dragging state visual feedback - OLD SCHOOL */
.dragging {
    z-index: 9999 !important;
    transform: rotate(1deg) scale(1.05);
    box-shadow: 10px 10px 0px #000000;
    opacity: 0.9;
    border: 5px solid #FF0000;
}

/* Throw effect - HARD SHADOWS */
@keyframes throw-effect {
    0% { 
        transform: scale(1.2) rotate(0deg); 
        box-shadow: 8px 8px 0px #FF00FF;
        border: 5px solid #FF00FF;
    }
    100% { 
        transform: scale(1) rotate(360deg); 
        box-shadow: 5px 5px 0px #333333;
        border: 5px solid #FFFF00;
    }
}

.throw-animation {
    animation: throw-effect 0.5s ease-out;
}

/* Web3 Integration Styles - Simple & High Contrast */

/* Header Web3 Integration */
.web3-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
}

.wallet-info, .token-info {
    background-color: #000000;
    color: #FFFF00;
    padding: 8px 12px;
    border: 3px solid #FFFF00;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 2px 2px 0px #333333;
}

.wallet-info .wallet-address {
    font-family: monospace;
}

.token-info div {
    margin: 1px 0;
}

.ready-to-claim {
    color: yellow;
    font-weight: bold;
}

/* Token Counter in Game Area */
.token-counter {
    background-color: #000000;
    color: #FFFF00;
    border: 5px solid #FFFF00;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 5px 5px 0px #333333;
}

.token-counter .token-info {
    background: none;
    color: white;
    padding: 0;
    border: none;
    box-shadow: none;
}

.token-counter .pending-clicks {
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
}

.token-counter .token-value {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: yellow;
}

.token-counter .click-credits {
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
}

.token-counter .remaining-supply {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: white;
    font-weight: bold;
    background: #111;
    border: 2px solid white;
    padding: 6px 10px;
    border-radius: 0;
    box-shadow: 2px 2px 0px #000;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0px #000;
    /* Make it hoverable */
    cursor: help;
    position: relative;
}

/* Supply Info Tooltip */
.token-counter .remaining-supply .supply-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: #FFFF00;
    text-align: left;
    padding: 12px 15px;
    border: 3px solid #FFFF00;
    box-shadow: 3px 3px 0px #000;
    z-index: 10001;
    width: 280px;
    font-size: 11px;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
    text-shadow: none;
    font-family: 'Courier New', monospace;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.token-counter .remaining-supply .supply-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: #FFFF00 transparent transparent transparent;
}

.token-counter .remaining-supply:hover .supply-tooltip {
    visibility: visible;
    opacity: 1;
}

.supply-tooltip .tooltip-header {
    color: #FFFF00;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
    border-bottom: 1px solid #FFFF00;
    padding-bottom: 4px;
}

.supply-tooltip .tooltip-item {
    margin: 6px 0;
    color: #FFF;
}

.supply-tooltip .tooltip-timestamp {
    color: #0FF;
    font-weight: bold;
}

/* Wallet Modal */
.wallet-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.wallet-modal .modal-content {
    background-color: #000000;
    color: #FFFF00;
    margin: 10% auto;
    padding: 30px;
    border: 5px solid #FFFF00;
    width: 90%;
    max-width: 400px;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
    box-shadow: 5px 5px 0px #000;
    position: relative;
}

.wallet-modal h2 {
    margin-bottom: 15px;
    font-size: 20px;
    color: black;
}

.wallet-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.wallet-features .feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #FFFF00;
    color: #000000;
    padding: 15px;
    border: 3px solid #000000;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 3px 3px 0px #333333;
}

.wallet-features .feature i {
    font-size: 16px;
    color: black;
}

/* MetaMask Installation Modal */
.metamask-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.metamask-modal .modal-content {
    background-color: #dc3545;
    color: white;
    margin: 15% auto;
    padding: 30px;
    border: 3px solid black;
    width: 90%;
    max-width: 400px;
    text-align: center;
    font-weight: bold;
}

.metamask-modal .install-btn {
    display: inline-block;
    background-color: white;
    color: #dc3545;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px;
    border: 3px solid black;
    font-family: Arial, sans-serif;
    cursor: pointer;
}

.metamask-modal .install-btn:hover {
    background-color: #f8f9fa;
}

/* Notifications */
.token-notification {
    position: fixed;
    top: 60px;
    right: 20px;
    padding: 15px 20px;
    color: #000000;
    z-index: 9999;
    max-width: 300px;
    border: 3px solid #000000;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 3px 3px 0px #333333;
}

.token-notification.info {
    background-color: #007bff;
    color: #FFFFFF;
}

.token-notification.success {
    background-color: #28a745;
    color: #FFFFFF;
}

.token-notification.warning {
    background-color: #FFFF00;
    color: #000000;
}

.token-notification.error {
    background-color: #dc3545;
    color: #FFFFFF;
}

.token-notification .notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.token-notification button {
    /* Inherits universal button styles but overrides for notification context */
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: inherit;
    font-size: 14px;
    padding: 5px 8px;
}

/* Transaction Notifications */
.transaction-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: purple;
    color: white;
    padding: 10px 15px;
    border: 2px solid white;
    z-index: 9999;
    font-weight: bold;
}

.transaction-notification a {
    color: yellow;
    text-decoration: underline;
    font-weight: bold;
}

/* Error Notifications */
.error-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: red;
    color: white;
    padding: 20px;
    border: 3px solid white;
    z-index: 10001;
    text-align: center;
    max-width: 400px;
    font-weight: bold;
}

.error-notification button {
    background-color: white;
    color: red;
    border: 3px solid black;
    padding: 8px 15px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

/* MetaMask Installation Modal - High Contrast Warning */
.metamask-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.metamask-modal .modal-content {
    background-color: #dc3545;
    color: #FFFFFF;
    margin: 15% auto;
    padding: 30px;
    border: 5px solid #FFFFFF;
    width: 90%;
    max-width: 400px;
    text-align: center;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 5px 5px 0px #000000;
}

.metamask-modal .install-btn {
    display: inline-block;
    background-color: white;
    color: red;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
    margin: 10px;
    border: 3px solid black;
    font-family: Arial, sans-serif;
    cursor: pointer;
}

.metamask-modal .install-btn:hover {
    background-color: yellow;
    color: black;
}

/* ============================================================================
   UNIFIED TYPOGRAPHY & CONTENT STYLES
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #FFFF00;
    text-shadow: 3px 3px 0px #000000;
    margin: 20px 0;
}

h1 {
    font-size: 28px;
    background-color: #000000;
    padding: 15px;
    border: 5px solid #FFFF00;
    box-shadow: 5px 5px 0px #333333;
    display: inline-block;
}

/* ============================================================================
   OLD-SCHOOL WEB ABSURDITY ANIMATIONS & EFFECTS
   ============================================================================ */

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-2px, -1px) rotate(-0.5deg); }
    20% { transform: translate(-1px, 0px) rotate(0.5deg); }
    30% { transform: translate(1px, 1px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(0.5deg); }
    50% { transform: translate(-1px, 1px) rotate(-0.5deg); }
    60% { transform: translate(-1px, 0px) rotate(0deg); }
    70% { transform: translate(1px, 0px) rotate(-0.5deg); }
    80% { transform: translate(-1px, -1px) rotate(0.5deg); }
    90% { transform: translate(1px, 1px) rotate(0deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes explodeParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--vx, 100px), var(--vy, 100px)) scale(0);
        opacity: 0;
    }
}

@keyframes megaExplode {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(2) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes glitch {
    0%, 100% { 
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    20% { 
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg);
    }
    40% { 
        transform: translate(-2px, -2px);
        filter: hue-rotate(180deg);
    }
    60% { 
        transform: translate(2px, 2px);
        filter: hue-rotate(270deg);
    }
    80% { 
        transform: translate(2px, -2px);
        filter: hue-rotate(360deg);
    }
}

@keyframes rainbow {
    0% { color: #ff0000; }
    16.66% { color: #ff8800; }
    33.33% { color: #ffff00; }
    50% { color: #00ff00; }
    66.66% { color: #0088ff; }
    83.33% { color: #8800ff; }
    100% { color: #ff0000; }
}

/* ============================================================================
   EXTRA OLD-SCHOOL WEB ABSURDITY EFFECTS
   ============================================================================ */

/* Blinking text effect */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.blink {
    animation: blink 1s infinite;
}

/* Scrolling rainbow text */
@keyframes scrollingRainbow {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

.rainbow-text {
    background: linear-gradient(90deg, 
        #ff0000, #ff8800, #ffff00, #00ff00, 
        #0088ff, #8800ff, #ff0088, #ff0000);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: scrollingRainbow 2s linear infinite;
}

/* Under construction GIF effect */
@keyframes construction {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-1deg); }
    75% { transform: translateX(5px) rotate(1deg); }
}

.under-construction {
    animation: construction 0.5s infinite;
    background: repeating-linear-gradient(
        45deg,
        #ffff00,
        #ffff00 10px,
        #000000 10px,
        #000000 20px
    );
    color: #ff0000;
    font-weight: bold;
    padding: 10px;
    border: 3px solid #ff0000;
}

/* Visitor counter style */
.visitor-counter {
    background: #000000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    border: 2px inset #c0c0c0;
    padding: 5px;
    font-size: 12px;
}

/* Web ring style buttons */
.webring-button {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    color: #000000;
    font-size: 11px;
    padding: 2px 5px;
    font-family: Arial, sans-serif;
}

.webring-button:hover {
    border: 2px inset #c0c0c0;
}

/* Flame text effect */
@keyframes flame {
    0%, 100% { 
        text-shadow: 0 0 5px #ff0000, 0 0 10px #ff4400, 0 0 15px #ff8800;
        color: #ff0000;
    }
    33% { 
        text-shadow: 0 0 5px #ff4400, 0 0 10px #ff8800, 0 0 15px #ffaa00;
        color: #ff4400;
    }
    66% { 
        text-shadow: 0 0 5px #ff8800, 0 0 10px #ffaa00, 0 0 15px #ffff00;
        color: #ff8800;
    }
}

.flame-text {
    animation: flame 1s infinite;
    font-weight: bold;
}

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

.spin {
    animation: spin 2s linear infinite;
    display: inline-block;
}

/* Matrix-style text */
@keyframes matrix {
    0% { opacity: 0; transform: translateY(-10px); }
    50% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

.matrix-text {
    animation: matrix 2s infinite;
    color: #00ff00;
    font-family: 'Courier New', monospace;
}

/* ============================================================================
   HEADER BAR SCROLL WRAPPER - ENABLE HORIZONTAL SCROLLBAR ON SMALL SCREENS
   ============================================================================ */

.header-bar-scroll-wrapper {
  width: 100vw;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
}

@media (max-width: 1200px) {
  .header-bar-scroll-wrapper {
    overflow-x: auto !important;
    overflow-y: hidden;
    width: 100vw;
    min-width: 0;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #FFFF00 #000;
  }
  .header-bar-scroll-wrapper::-webkit-scrollbar {
    height: 10px;
    background: #000;
    display: block !important;
  }
  .header-bar-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #FFFF00;
    border-radius: 0;
    border: 2px solid #000;
  }
  .header-bar-scroll-wrapper::-webkit-scrollbar-track {
    background: #000;
  }
  .header-bar {
    min-width: 1200px;
    width: fit-content;
    flex-wrap: nowrap;
  }
}

.header-bar-scroll-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100vw;
  min-width: 0;
  position: relative;
}

.header-bar-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1200px) {
  .header-bar-scroll-wrapper::-webkit-scrollbar {
    display: block !important;
  }
}

/* Remove body horizontal scroll */
body {
  overflow-x: hidden;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.95);
}
.modal-content {
    background-color: #000000;
    color: #FFFF00;
    margin: 10% auto;
    padding: 30px 20px;
    border: 5px solid #FFFF00;
    width: 90%;
    max-width: 400px;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: center;
    box-shadow: 5px 5px 0px #000;
    position: relative;
}

.modal-content .connect-btn {
    display: block;
    width: 100%;
    margin: 16px 0;
    padding: 14px;
    font-size: 16px;
    background: #FFFF00;
    color: #000;
    border: 3px solid #000;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 3px 3px 0px #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.1s, color 0.1s, box-shadow 0.1s;
}
.modal-content .connect-btn:hover {
    background: #ffe066;
    color: #000;
    box-shadow: 1px 1px 0px #000;
}
.modal-content h2 {
    color: #FFFF00;
    font-size: 22px;
    margin-bottom: 18px;
    text-shadow: 2px 2px 0px #000;
}