* {
    box-sizing: border-box;
}

body {
    font-family: 'Doto', sans-serif;
    margin: 0;
    background-color: #f7f7f7;
    color: #222227;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    text-align: center;
    overflow-x: hidden;
}

#splash-screen, #welcome-screen, .screen-container {
    width: 100%;
    max-width: 400px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    background-color: #f7f7f7;
}

.logo-text {
    font-family: 'Doto', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #222227;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.tap-to-continue {
    font-family: 'Doto', sans-serif;
    font-size: 14px;
    color: #555555; /* Stronger grey */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
    opacity: 0.8;
    animation: blink 1.5s infinite;
}

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

.title-container {
    border: 6px solid #222227;
    padding: 20px 30px;
    margin-bottom: 40px;
    background-color: #ffffff;
    width: fit-content;
    box-shadow: 12px -12px 0px #f7931e;
}

.title-text {
    font-family: 'Doto', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #222227;
    text-transform: uppercase;
}

.info-text-container {
    border: 4px dashed #f7931e;
    padding: 25px;
    margin-bottom: 40px;
    text-align: left;
    background-color: #ffffff;
    box-shadow: 10px -10px 0px #222227;
}

.dashboard-button, .auth-button, .action-button {
    font-family: 'Doto', sans-serif;
    background-color: #ffffff;
    color: #222227;
    border: 6px solid #222227;
    padding: 20px 30px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
    border-radius: 0;
    text-transform: uppercase;
    box-shadow: 10px 10px 0px #222227;
    transition: all 0.1s ease;
    margin-bottom: 25px;
}

.dashboard-button:active, .auth-button:active, .action-button:active {
    transform: translate(5px, 5px);
    box-shadow: 5px 5px 0px #222227;
}

.orange-button {
    background-color: #f7931e;
    color: #ffffff;
}

.delete-button {
    background-color: #ff4444;
    color: #ffffff;
}

.account-username-text {
    font-size: 1.4em;
    margin-bottom: 35px;
    border-bottom: 4px solid #222227;
    padding-bottom: 15px;
    font-weight: bold;
    text-transform: uppercase;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group input {
    width: 100%;
    border: 4px solid #222227;
    padding: 18px;
    font-family: 'Doto', sans-serif;
    font-size: 18px;
    background-color: #ffffff;
    color: #222227;
    outline: none;
    box-shadow: 8px -8px 0px #222227;
    box-sizing: border-box;
    margin-bottom: 15px;
    transition: all 0.1s ease;
}

.input-group input:focus {
    transform: translate(4px, -4px);
    box-shadow: 4px -4px 0px #f7931e;
}

.modal-content {
    background-color: #ffffff;
    padding: 40px;
    border: 6px solid #222227;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 12px -12px 0px #f7931e;
}

.dashboard-logo {
    font-family: 'Doto', sans-serif;
    font-size: 120px;
    font-weight: 900;
    color: #222227;
    margin-top: 30px;
    margin-bottom: 50px;
    line-height: 1;
    text-shadow: 10px -10px 0px #f7931e;
}

#splash-screen {
    position: relative;
    /* cursor: pointer; */ /* Removed cursor pointer as we have buttons now */
}

.splash-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    width: 80%;
    max-width: 300px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.breathing-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    animation: breathe 3s ease-in-out infinite;
}

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

.logo-text {
    font-family: 'Doto', monospace; /* Monospace might help with blocky feel */
    font-size: 24px; /* Adjust as needed */
    font-weight: normal; /* Doto has variable weights */
    color: #222227;
}

.tap-to-continue {
    position: absolute;
    bottom: 40px;
    font-size: 14px;
    color: #222227;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    font-family: 'Doto', sans-serif;
    
    /* Very slow breathing and fade animation */
    animation: slow-breathe-fade 8s ease-in-out infinite;
}

@keyframes slow-breathe-fade {
    0%, 100% { 
        opacity: 0.2;
        transform: scale(0.98);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.02);
    }
}

#welcome-screen {
    background-color: #f7f7f7;
    justify-content: space-around; /* Distribute content vertically */
}

.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.title-container {
    border: 4px solid #222227;
    padding: 15px 25px;
    margin-bottom: 30px;
    background-color: #f7f7f7;
    width: fit-content;
    box-shadow: 8px -8px 0px #f7931e;
}

.title-text {
    font-family: 'Doto', monospace;
    font-size: 28px; /* Adjust as needed */
    font-weight: bold;
    color: #222227;
    text-transform: uppercase;
}

.info-text-container {
    border: 4px dashed #f7931e;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
    background-color: #f7f7f7;
    box-shadow: 8px -8px 0px #ffffff;
}

.info-text-container p {
    font-family: 'Doto', sans-serif;
    font-size: 14px; /* Adjust as needed */
    line-height: 1.6;
    color: #222227; /* Dark text */
    margin-bottom: 15px;
}

.info-text-container p:last-child {
    margin-bottom: 0;
}

#join-game-button {
    font-family: 'Doto', sans-serif;
    background-color: #222227;
    color: #ffffff;
    border: 2px solid #222227;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%; /* Make button full width of its container */
    max-width: 300px; /* Max width for the button */
    border-radius: 0; /* Sharp corners as in image */
    text-transform: uppercase; /* Text seems uppercase */
    box-shadow: 8px -8px 0px #ffffff;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

#join-game-button:active {
    transform: translate(4px, -4px);
    box-shadow: 4px -4px 0px #ffffff;
}

/* Auth Screens (Registration & Login) */
#registration-screen, #login-screen {
    background-color: #f7f7f7;
    justify-content: flex-start; /* Align content to the top */
    padding-top: 50px; /* Space from the top */
}

.auth-form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 350px; /* Consistent width for auth forms */
}

.faded-r-logo {
    font-family: 'Doto', sans-serif;
    font-size: 100px; /* Adjust as needed */
    font-weight: bold;
    color: #f7f7f7; /* Match background */
    margin-bottom: 30px;
    text-shadow: 4px -4px 0px #222227, 8px -8px 0px #f7931e;
    line-height: 1;
}

.auth-form-container h2 {
    font-size: 24px;
    font-weight: bold;
    color: #222227;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.input-group {
    width: 100%;
    margin-bottom: 25px;
    position: relative;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: #555555;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="password"],
.input-group input[type="number"] {
    width: 100%;
    border: 2px solid #222227;
    padding: 15px;
    font-family: 'Doto', sans-serif;
    font-size: 16px;
    background-color: #ffffff;
    color: #222227;
    outline: none;
    box-shadow: 8px -8px 0px #222227;
    box-sizing: border-box;
    margin-bottom: 10px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.input-group input:focus {
    transform: translate(4px, -4px);
    box-shadow: 4px -4px 0px #222227;
}

.input-underline {
    display: none; /* Remove the old underline */
}

.terms-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 25px;
    position: relative; /* For custom checkbox positioning */
}

.terms-group-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.terms-group input[type="checkbox"] {
    opacity: 0; /* Hide actual checkbox */
    position: absolute;
    width: 20px;
    height: 20px;
}

.terms-group .checkbox-label {
    width: 20px;
    height: 20px;
    border: 2px solid #222227;
    background-color: #ffffff;
    display: inline-block;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
    box-shadow: 2px -2px 0px #222227;
}

.terms-group input[type="checkbox"]:checked + .checkbox-label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid #000000;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.terms-group span, .checkbox-text {
    font-size: 0.8em;
    color: #222227;
    line-height: 1.4;
    text-transform: uppercase;
    font-weight: bold;
}

.terms-text-link {
    font-size: 14px;
    color: #222227;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: #f7931e;
    text-decoration-thickness: 2px;
    font-weight: bold;
    text-transform: uppercase;
}

.auth-button {
    font-family: 'Doto', sans-serif;
    background-color: #222227;
    color: #ffffff;
    border: 2px solid #222227;
    padding: 15px 0; /* Full width, so vertical padding only */
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    border-radius: 0;
    text-transform: uppercase;
    margin-top: 10px;
    margin-bottom: 20px;
    box-shadow: 8px -8px 0px #f7931e; /* Orange shadow for dark button */
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.auth-button.orange-button, .dashboard-button.orange-button, .action-button.orange-button {
    background-color: #f7931e;
    color: #222227;
    border-color: #222227;
    box-shadow: 8px -8px 0px #222227;
}

.auth-button:active {
    transform: translate(4px, -4px);
    box-shadow: 4px -4px 0px #ffffff;
}

.auth-button.orange-button:active, .dashboard-button.orange-button:active, .action-button.orange-button:active {
    transform: translate(4px, -4px);
    box-shadow: 4px -4px 0px #222227;
}

.form-link {
    font-size: 14px;
    color: #222227;
    text-decoration: underline;
    text-decoration-color: #f7931e;
    text-decoration-thickness: 2px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    display: block;
    margin-top: 15px;
}

.error-message {
    background-color: #ffdddd;
    border: 2px solid #ff0000;
    color: #d8000c;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 0;
    font-size: 14px;
    text-align: center;
    box-shadow: 4px -4px 0px #ff0000;
    font-weight: bold;
}

@keyframes gradient-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.pending-trade-button {
    background: linear-gradient(270deg, #ff8c00, #ff0080, #7928ca, #ff8c00);
    background-size: 600% 600%;
    animation: gradient-move 3s ease infinite;
    color: white !important;
    border-top: 3px solid #fff !important;
    border-right: 3px solid #fff !important;
}

/* Custom Modal Styles */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px;
    border: 4px solid #222227;
    width: 80%;
    max-width: 350px;
    text-align: center;
    box-shadow: 8px -8px 0px #f7931e;
}

.modal-content p {
    font-family: 'Doto', sans-serif;
    font-size: 16px;
    margin-bottom: 25px;
    white-space: pre-wrap; /* Allows \n to render as line breaks */
}

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

.modal-buttons button {
    margin: 0;
    padding: 10px;
}

/* Pixel Style Buttons */
.pixel-button-small {
    font-family: 'Doto', sans-serif;
    color: #222227;
    border: 4px solid #222227;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 6px -6px 0px #222227;
    transition: all 0.1s ease;
    border-radius: 0;
}

.pixel-button-small:active {
    transform: translate(3px, -3px);
    box-shadow: 3px -3px 0px #222227;
}

.pixel-button-small.red-button {
    background-color: #ff6b6b;
    color: #ffffff;
}

.pixel-button-small.red-button:hover {
    background-color: #ff5252;
}

.pixel-button-small.red-button:active {
    transform: translate(2px, -2px);
    box-shadow: 4px -4px 0px #222227;
}

.pixel-button-tiny {
    font-family: 'Doto', sans-serif;
    background-color: #ffffff;
    color: #222227;
    border: 2px solid #222227;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 4px -4px 0px #222227;
    transition: all 0.1s ease;
    border-radius: 0;
}

.pixel-button-tiny:active {
    transform: translate(2px, -2px);
    box-shadow: 2px -2px 0px #222227;
}

/* Wallet Screen Enhancements */
#wallet-screen, #qr-code-screen {
    width: 100%;
    max-width: 400px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0 auto; /* Center on wider screens */
}

#wallet-screen .dashboard-button {
    margin-top: 30px;
    margin-bottom: 20px;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%; /* Allow buttons to be wider if needed */
}

#go-to-jackpot-button-from-wallet {
    margin-top: 60px !important; /* Even more space from tokens */
}

.wallet-container {
    background-color: #e8e8e8;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 25px 40px 20px; /* Extra padding on right for shadows, and bottom for buttons */
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}

.wallet-header, .jackpot-header, .account-header, .voting-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.wallet-header .back-button, .jackpot-header .back-button, .account-header .back-button, .voting-header .back-button {
    position: static;
    margin-bottom: 0;
}

.wallet-header h2, .jackpot-header h2, .account-header h2, .voting-header h2 {
    font-family: 'Doto', sans-serif;
    font-size: clamp(16px, 6vw, 24px);
    text-transform: uppercase;
    background-color: #222227;
    color: #ffffff;
    padding: 10px 20px;
    box-shadow: 6px -6px 0px #f7931e;
    margin: 0;
    text-align: right;
    margin-left: 10px;
    white-space: nowrap;
}

#wallet-items-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin-bottom: 50px; /* More space before buttons */
    padding-right: 12px; /* Room for shadows */
    box-sizing: border-box;
}

.empty-wallet-message {
    font-family: 'Doto', sans-serif;
    font-size: 16px;
    color: #222227;
    text-align: center;
    width: 100%;
    grid-column: 1 / -1;
}

.empty-wallet-message a {
    color: #FFA500;
    text-decoration: underline;
}

.wallet-item {
    background-color: #ffffff;
    border: 3px solid #222227;
    padding: 5px;
    box-shadow: 4px -4px 0px #222227;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    overflow: hidden; /* Prevent image overflow */
}

.wallet-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated; /* Since user says they are 32x32 */
    display: block;
}

.wallet-item:hover {
    transform: translate(2px, -2px);
    box-shadow: 4px -4px 0px #f7931e;
}

.wallet-item p {
    font-family: 'Doto', sans-serif;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
}

/* Dashboard Screen */
#dashboard-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Pushes 'My account' down */
    padding: 20px;
    background-color: #f7f7f7;
    height: 100vh; /* Full viewport height */
    height: 100dvh;
    box-sizing: border-box;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px; /* Max width for content */
    padding: 20px;
    box-sizing: border-box;
}

.dashboard-logo {
    font-family: 'Doto', sans-serif; /* Assuming Doto is for pixelated look */
    font-size: 100px; /* Large R */
    font-weight: bold;
    color: #222227;
    margin-top: 20px;
    margin-bottom: 40px;
    line-height: 1;
    text-shadow: 8px -8px 0px #f7931e;
}

.quick-access {
    width: 100%;
    margin-bottom: 30px;
}

.quick-access .section-title {
    font-size: 16px;
    color: #222227;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px solid #f7931e;
    padding-bottom: 5px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-button {
    background-color: #ffffff;
    color: #222227;
    border: 4px solid #222227;
    padding: 18px 25px;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Doto', sans-serif;
    cursor: pointer;
    text-align: left;
    width: 100%;
    margin-bottom: 25px;
    box-sizing: border-box;
    box-shadow: 10px -10px 0px #222227;
    transition: all 0.1s ease;
    text-transform: uppercase;
    border-radius: 0;
}

.dashboard-button:active {
    transform: translate(4px, -4px);
    box-shadow: 6px -6px 0px #222227;
}

.dashboard-button.bottom-button {
margin-top: auto; /* Pushes this button to the bottom of its container if dashboard-container has flex properties */
position: absolute; /* Alternative: if dashboard-screen is relative */
bottom: 30px;
width: calc(100% - 40px); /* Adjust width considering padding of parent */
max-width: 360px; /* Consistent with container max-width */
}

/* Scan Screen Styles */
#scan-screen {
background-color: #f7f7f7;
justify-content: flex-start; /* Align content to the top */
padding-top: 20px; /* Space from the top */
box-sizing: border-box;
}

.scan-container {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
max-width: 380px; /* Consistent width */
height: 100%;
padding: 0 20px;
box-sizing: border-box;
}

.scan-header {
width: 100%;
text-align: center;
margin-bottom: 20px;
position: relative; /* For potential back button positioning */
}

.scan-header h2 {
font-size: 24px;
font-weight: bold;
color: #222227;
margin: 10px 0;
text-transform: uppercase;
}

.scan-area {
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
margin-bottom: 20px;
}

.scan-frame {
    width: 80%; /* Adjust width as needed */
    max-width: 300px;
    aspect-ratio: 1 / 1; /* Square aspect ratio to align nicely with QR */
    background-color: #ff8c00; /* Orange frame */
    padding: 15px; /* Smaller padding as requested */
    border: 6px solid #222227; /* Thinner outer bezel */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 10px -10px 0px #222227; /* Stronger shadow */
}

.camera-feed-placeholder {
    width: 100%;
    height: 100%;
    background-color: #d3d3d3; /* Greyed out area for behind the camera feed */
    overflow: hidden; /* Ensures video doesn't spill out */
}

/* Styles for the div where html5-qrcode renders the scanner */
#qr-reader {
    width: 100%;
    height: 100%;
    position: relative; /* For potential overlay elements if needed */
}

#qr-reader video {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
}

#qr-username-display {
    font-family: 'Doto', sans-serif;
    color: #222227;
}

/* Hide default border from html5-qrcode if it appears and is not desired */
#qr-reader > div:first-child {
    border: none !important; 
}

/* Account Screen Styles */
#account-screen {
    background-color: #f7f7f7;
    justify-content: flex-start;
    padding-top: 20px;
    box-sizing: border-box;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.account-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 380px;
    padding: 0 20px;
    box-sizing: border-box;
}

.account-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.account-header h2 {
    font-family: 'Doto', sans-serif;
    font-size: 24px;
    text-transform: uppercase;
    background-color: #222227;
    color: #ffffff;
    padding: 10px 20px;
    box-shadow: 6px -6px 0px #f7931e;
    margin: 0;
    text-align: right;
    margin-left: 10px;
}

.account-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.account-actions {
    width: 100%;
    margin-top: 20px;
}

/* General utility class for screen padding */
.screen-padding {
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Trade Screen Styles */
#trade-screen {
    background-color: #f7f7f7;
    justify-content: flex-start; /* Align content to the top */
    padding-top: 20px; /* Space from the top */
}

.trade-container h2 {
    font-size: 24px;
    font-weight: bold;
    color: #222227;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.trade-container p {
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

#qr-scan-result {
    font-style: italic;
    color: #222227;
    word-break: break-all; /* In case QR content is long */
    margin-bottom: 20px;
    display: none; /* Initially hidden, will be shown by JS if needed or removed if not used directly */
}

.trade-header {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    width: 100%;
    max-width: 380px; /* Adjust as needed */
    margin-bottom: 30px;
}

.trade-nickname-box {
    border: 2px solid #222227;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    background-color: #ffffff;
    color: #222227;
    text-align: center;
    min-width: 120px; /* Ensure some width */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 4px -4px 0px #222227;
}

.trade-arrow {
    font-size: 24px;
    font-weight: bold;
    color: #000000;
    padding: 10px 0; /* Adjust padding for vertical layout */
    transform: rotate(90deg); /* Point arrow downwards */
}

.trade-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: left;
    width: 100%;
    max-width: 380px; /* Match nickname boxes container */
}

#inviting-user-wallet-trade-container {
    width: 100%;
    max-width: 380px; /* Match nickname boxes container */
    min-height: 180px; /* Adjust as needed, should fit at least 2 rows of items */
    border: 4px dashed #f7931e; /* Match info-text-container */
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap; /* Items will wrap to next line */
    gap: 15px; /* Spacing between items */
    align-content: flex-start; /* Align wrapped lines to the start */
    background-color: #ffffff;
    box-shadow: 8px -8px 0px #ffffff;
    box-sizing: border-box;
}

/* Re-use wallet-item style for trade screen, or make specific if needed */
#inviting-user-wallet-trade-container .wallet-item {
    width: 70px; /* Slightly smaller for trade screen if needed */
    height: 70px;
    border: 2px solid #222227;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer; /* Indicate items are selectable */
    background-color: #ffffff;
    box-shadow: 4px -4px 0px #222227;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s;
}

#inviting-user-wallet-trade-container .wallet-item.selected-for-trade {
    background-color: #f7931e; /* Orange highlight for selected items */
    border-color: #222227;
    transform: translate(2px, -2px);
    box-shadow: 2px -2px 0px #222227;
}

#inviting-user-wallet-trade-container .wallet-item img {
    max-width: 80%;
    max-height: 80%;
}

#inviting-user-wallet-trade-container .empty-wallet-message {
    font-family: 'Doto', sans-serif;
    font-size: 14px;
    color: #222227;
    text-align: center;
    width: 100%;
    padding: 20px 0;
}

.trade-actions {
    width: 100%;
    max-width: 380px;
    display: flex;
    justify-content: center; /* Center the propose button for now */
    margin-top: 10px;
    margin-bottom: 20px;
}

#propose-trade-button {
    /* Styles inherited from .dashboard-button, .action-button, .orange-button */
    /* Add specific overrides if needed */
    padding: 12px 25px;
    font-size: 18px;
}

.scan-back-button {
width: 100%;
max-width: 300px;
margin-top: auto; /* Pushes button to bottom if scan-container has height */
margin-bottom: 20px; /* Space from bottom edge */
}






/* Jackpot Screen (Token Exchange) Styles */
.jackpot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly; /* Spread out UI evenly */
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    background-color: #f7f7f7;
}

.jackpot-header {
    display: flex;
    justify-content: flex-start; /* Aligns back button to the left */
    width: 100%;
    margin-bottom: 40px; /* Increased to move content lower */
}

/* Assuming .action-button and .orange-button might exist or need definition */
/* .action-button {
    padding: 12px 20px;
    font-family: 'Doto', sans-serif;
    font-size: 18px;
    border: 2px solid #000;
    cursor: pointer;
    text-transform: uppercase; 
}

.orange-button {
    background-color: #FFA500; 
    color: white;
} */

#draw-token-button {
    /* Specific styles if needed, or rely on .action-button.orange-button */
    margin-top: 30px; /* Push it lower */
    margin-bottom: 15px;
    padding: 15px 30px; /* Larger button */
    font-size: 20px;
}

.draw-counter-box {
    border: 2px solid #222227;
    padding: 8px 15px;
    font-family: 'Doto', sans-serif;
    font-size: 18px;
    margin-bottom: 40px; /* Increased to move reel down */
    background-color: #ffffff;
    color: #222227;
    min-width: 80px; /* Ensure it has some width */
    text-align: center;
    box-shadow: 4px -4px 0px #222227;
}

#jackpot-reel-viewport {
    width: 100%;
    max-width: 240px; /* Even smaller */
    height: 90px; /* Even smaller */
    overflow: hidden;
    position: relative;
    border: 6px solid #f7931e; /* Orange bounding box */
    background-color: #ffffff;
    margin-bottom: 40px; /* More space below reel */
    /* Remove orange shadow */
    box-shadow: 8px -8px 0px #222227; /* Dark shadow instead */
    touch-action: pan-y;
    cursor: grab;
    display: flex;
    align-items: center; /* Center reel vertically */
}
#jackpot-reel-viewport:active {
    cursor: grabbing;
}

#jackpot-reel {
    display: flex;
    align-items: center; /* Center tokens vertically */
    height: 100%; /* Fills the viewport height */
    position: absolute; /* Allows smooth animation with translateX */
    left: 0; /* Initial position */
    /* Width will be set by JS based on number of items */
    transition: transform 2s cubic-bezier(0.25, 0.1, 0.25, 1); /* Enabled and adjusted duration/easing */
}

.jackpot-token-item {
    width: 60px; /* Drastically smaller boxes */
    height: 60px; /* Drastically smaller boxes */
    border: 3px solid #222227;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 4px; /* Smaller margin */
    background-color: #ffffff;
    box-sizing: border-box;
    box-shadow: 4px -4px 0px #222227;
    border-radius: 0;
}

.jackpot-token-item img {
    max-width: 90%; /* "Only 10% smaller" than the box */
    max-height: 90%; /* "Only 10% smaller" than the box */
    image-rendering: pixelated;
}

#jackpot-win-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66px; /* Snug fit for 60px box */
    height: 66px; /* Snug fit for 60px box */
    border: 4px solid #f7931e; /* Orange border */
    box-sizing: border-box;
    pointer-events: none;
    z-index: 10;
}

.jackpot-instruction {
    font-family: 'Doto', sans-serif;
    font-size: 14px;
    color: #222227;
    text-align: center;
}


/* QR Code Screen */


.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#user-qr-code-img {
    max-width: 80vw; /* Responsive width */
    max-height: 70vh; /* Responsive height */
    width: auto;
    height: auto;
    border: 5px solid #000000;
    margin-bottom: 20px;
}

.qr-code-container p {
    font-size: 16px;
    color: #222227;
    margin-top: 10px;
}

.back-button-qr, .back-button {
    background-color: #f7931e; /* Orange accent */
    color: #222227;
    border: 2px solid #222227;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 0;
    cursor: pointer;
    margin-bottom: 30px; /* Space between button and QR code */
    align-self: flex-start; /* Align to the left if container is wider */
    box-shadow: 4px -4px 0px #222227;
    font-weight: bold;
    text-transform: uppercase;
    font-family: 'Doto', sans-serif;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    flex-shrink: 0;
}

.back-button-qr:active, .back-button:active {
    transform: translate(2px, -2px);
    box-shadow: 2px -2px 0px #222227;
}


/* Pending Trades Screen */
#pending-trades-screen {
    background-color: #f7f7f7;
    width: 100%;
    max-width: 400px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.pending-trades-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    position: relative;
    padding-bottom: 100px; /* Space for the static footer */
}

.pending-trades-header {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
}

.pending-trades-header h2 {
    flex: 1;
    text-align: center;
    font-family: 'Doto', sans-serif;
    text-transform: uppercase;
    font-weight: 900;
    margin: 0;
    margin-right: 40px; /* Offset for the back button to center the title */
}

.pending-trades-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 320px;
    overflow-y: auto;
    flex: 1;
}

.pending-trades-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    background-color: #f7f7f7;
    z-index: 10;
}

#perform-another-rerelation-button {
    width: 100%;
    max-width: 320px;
}

.pending-trade-item {
    width: 100%;
    padding: 15px;
    background-color: #ffffff;
    border: 4px solid #222227;
    box-shadow: 8px -8px 0px #222227;
    font-family: 'Doto', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    text-align: left;
    transition: transform 0.1s;
    margin-bottom: 20px;
}

.pending-trade-item:active {
    transform: translate(4px, -4px);
    box-shadow: 4px -4px 0px #222227;
}

/* Status Color Coding */
.pending-trade-item.status-canceled {
    background-color: #ff6b6b; /* Red */
    color: #ffffff;
}

.pending-trade-item.status-finalization {
    background-color: #4caf50; /* Green */
    color: #ffffff;
}

.pending-trade-item.status-ready {
    background-color: #ffffff; /* White */
    color: #222227;
}

.pending-trade-item.status-initiated {
    background-color: #f7931e; /* Orange */
    color: #ffffff;
}

.pending-trade-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.pending-trade-info {
    flex: 1;
    margin-right: 10px;
    overflow: hidden;
}

.pending-trade-direction {
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-status {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: normal;
    margin-top: 4px;
}

.pending-trade-arrow {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Terms & Conditions Screen */
#terms-screen {
    background-color: #f7f7f7;
    width: 100%;
    max-width: 400px; /* Match other screens */
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0; /* Remove padding to allow header/content to span full width */
}

.terms-container {
    width: 100%;
    height: 100vh; /* Full viewport height */
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.terms-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Pushes button to left, title to center/right */
    padding: 15px 20px;
    border-bottom: 2px solid #222227;
    width: 100%;
    box-sizing: border-box;
}

.terms-header button {
    background-color: #f7931e;
    border: 2px solid #222227;
    padding: 10px 20px;
    font-family: 'Doto', sans-serif;
    font-size: 16px;
    color: #222227;
    cursor: pointer;
    box-shadow: 4px -4px 0px #222227;
    font-weight: bold;
    text-transform: uppercase;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.terms-header button:active {
    transform: translate(2px, -2px);
    box-shadow: 2px -2px 0px #222227;
}

.terms-header h3 {
    font-size: 20px;
    font-weight: bold;
    color: #000000;
    margin: 0; /* Remove default margin */
    flex-grow: 1; /* Allow title to take space */
    text-align: center; /* Center title */
}

.terms-content {
    flex-grow: 1; /* Takes remaining vertical space */
    overflow-y: auto; /* Makes content scrollable */
    padding: 20px;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    color: #333333;
}

.terms-content p {
    margin-bottom: 15px;
}

/* Voting Screen Styles */
.voting-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.voting-input-area {
    width: 100%;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.voting-input-area input {
    font-family: 'Doto', sans-serif;
    padding: 15px;
    border: 6px solid #222227;
    font-size: 18px;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 8px 8px 0px #222227;
}

.token-votes-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.token-vote-item {
    font-family: 'Doto', sans-serif;
    background-color: #ffffff;
    border: 6px solid #222227;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 8px 8px 0px #222227;
    transition: all 0.1s ease;
    text-transform: uppercase;
    font-weight: 700;
}

.token-vote-item:active {
    transform: translate(4px, 4px);
    box-shadow: 4px 4px 0px #222227;
}

.token-vote-item.voted {
    background-color: #f7931e;
    color: #ffffff;
}

.token-vote-name {
    font-size: 18px;
}

.token-vote-count {
    background-color: #222227;
    color: #ffffff;
    padding: 5px 10px;
    font-size: 16px;
}

.token-vote-item.voted .token-vote-count {
    background-color: #ffffff;
    color: #222227;
}
