body {
    margin: 0;
    min-height: 100vh; /* Changed from height to min-height */
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('background.png') center/cover no-repeat;
    color: #fff;
    /* Allow scrolling if content is taller than screen */
    overflow-y: auto; 
}

.popup {
    background-color: rgba(13, 13, 13, 0.8);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    /* Make the card responsive */
    width: 90%; 
    max-width: 750px; /* Slightly wider for better desktop presence */
    margin: 20px 0; /* Add margin so it doesn't touch the edges on mobile */
}

@media (max-width: 600px) {
    .popup {
        padding: 25px 20px; 
    }
    
    /* Stacks the profile picture on top of the text */
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* Centers the pronouns and flags */
    .meta {
        justify-content: center;
    }
}

.main-pfp {
    border-radius: 50%;
    object-fit: cover;
}

/* Update your button to remove the old background-image logic */
.icon-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 16px;
    transition: background-color 0.2s;
    background-color: black;
    color: #fff;
    border: 1px solid #333;
    /* This stops the padding from making the button wider than 100% */
    box-sizing: border-box; 
}

/* Style the icon specifically */
.btn-icon {
    width: 20px;
    height: 20px;
}

.icon-button:hover {
    background-color: #1a1a1a;
}

.profile-header {
  display: flex;
  gap: 25px;
  align-items: flex-start;
  margin-bottom: 25px;
}

.main-pfp {
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 10px 0;
}

.country-flag {
  width: 36px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.pronouns {
  font-size: 1.1em;
  color: #ddd;
}

/* Personal Stats Styling */
.personal-stats {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 15px;
}

.personal-stats p {
    margin: 5px 0;
    font-size: 14px;
    color: #ddd;
}

/* Monero Dropdown Styling */
.crypto-dropdown {
    margin-bottom: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Removes the default HTML triangle marker in some browsers */
.crypto-dropdown summary::-webkit-details-marker {
    display: none;
}

.dropdown-content {
    background-color: #111;
    padding: 12px;
    border-radius: 0 0 8px 8px;
    border: 1px solid #333;
    border-top: none;
    margin-top: 0;
    font-size: 13px;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    width: 100%;
    /* Prevents the text box padding from pushing it out of line */
    box-sizing: border-box; 
}

/* Add this new block */
.dropdown-content code {
    color: #f2a900; 
    display: block; /* Makes the code block take up the full space */
    word-break: break-all; /* Forces the long address to wrap to the next line */
    white-space: normal;
}

/* Removes the hidden margin gap between the button and the dropdown content */
.crypto-dropdown summary {
    margin-bottom: 0;
}

/* Flattens the bottom corners of the button only when the dropdown is expanded */
.crypto-dropdown[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* --- NEW SOCIAL ROW & BUTTON STYLES --- */
.social-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.social-row .icon-button {
    margin-bottom: 0; /* Let the row handle the spacing */
    flex: 1; /* Makes the main link stretch to fill space */
    text-decoration: none; /* Removes the blue underline from links */
}

/* The individual platform PFPs */
.platform-pfp {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: -5px; /* Pulls it slightly closer to the logo */
}

/* The square copy buttons */
.action-btn {
    background-color: #111;
    color: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: #222;
}

/* Monero Action Bar */
.monero-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.monero-actions a {
    color: #4da6ff;
    text-decoration: none;
}

.monero-actions .action-btn {
    padding: 5px 10px;
}

/* --- MODAL STYLES --- */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #333;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    text-align: center;
}

.modal-content h3 { margin-top: 0; color: #fff; }
.modal-content p { color: #aaa; margin-bottom: 20px; }

.modal-option-btn {
    background-color: #111;
    color: #fff;
    border: 1px solid #333;
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    transition: 0.2s;
}

.modal-option-btn:hover { background-color: #222; }

.preview-text {
    font-family: monospace;
    color: #4da6ff;
    word-break: break-all;
    text-align: left;
}

.modal-close-btn {
    background-color: #b30000;
    color: white;
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: bold;
}

.modal-close-btn:hover { background-color: #8a0000; }