/* Basic CSS Reset/Normalize */
html {
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape mode */
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-family: sans-serif; /* 1 */
    line-height: 1.15; /* 2 */
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
}

main {
    display: block;
}

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

hr {
    box-sizing: content-box; /* 1 */
    height: 0; /* 1 */
    overflow: visible; /* 2 */
}

a {
    background-color: transparent;
}

b,
strong {
    font-weight: bolder;
}

img {
    border-style: none;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit; /* 1 */
    font-size: 100%; /* 1 */
    line-height: 1.15; /* 1 */
    margin: 0; /* 2 */
}

button,
input { /* 1 */
    overflow: visible;
}

button,
select { /* 1 */
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

textarea {
    overflow: auto;
}

/* Your Existing Styles Begin Here */

:root {
    --black: #000000;
    --white: #ffffff;
    --gray: #666666;
    --light-gray: #f8f8f8;
    --border: #e0e0e0;
    --max-width: 640px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--black);
    background: var(--white);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
}

.main-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--gray);
    border-top: 1px solid var(--border);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--black);
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Home page */
.home-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 1rem;
    text-align: center;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.huge-text {
    font-size: 2.5rem;
    margin: 2rem 0;
    font-weight: 600;
    line-height: 1.2;
}

.subtitle {
    color: var(--gray);
    margin: 1rem 0 2rem;
}

.url-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 2rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.url-prefix {
    padding: 0.75rem 1rem;
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-right: none;
    font-size: 1rem;
}

.url-input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-left: none;
    border-right: none;
    font-size: 1rem;
    outline: none;
    flex: 1;
}

.url-input:focus {
    border-color: var(--black);
}

.btn-claim {
    padding: 0.75rem 1rem;
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    border: 1px solid var(--black);
    font-size: 1rem;
}

.btn-claim:hover {
    background: var(--white);
    color: var(--black);
}

.btn {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--black);
    text-decoration: none;
    border: 1px solid var(--border);
    display: inline-block;
    font-size: 1rem;
}

.btn:hover {
    border-color: var(--black);
}

/* Navigation */
.main-nav {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.nav-logo {
    font-weight: 600;
    text-decoration: none;
    color: var(--black);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-right: 1rem;
}

.nav-username {
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.nav-profile-link {
    color: #007bff;
    text-decoration: underline;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.nav-profile-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.25rem;
    flex-shrink: 0;
    -webkit-transition: color 0.2s;
    -o-transition: color 0.2s;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: var(--black);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 0.5rem 0;
}

.nav-btn:hover {
    color: var(--black);
    text-decoration: underline;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle:hover {
    color: var(--black);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        position: relative;
    }
    
    .nav-left {
        flex: 1;
        min-width: 0;
    }
    
    .nav-username {
        flex: 1;
        min-width: 0;
    }
    
    .nav-profile-link {
        max-width: 180px;
        font-size: 0.8rem;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 2;
    }
    
    .nav-buttons {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        border-top: 1px solid var(--border);
        padding: 1rem 0 0.5rem 0;
        margin-top: 1rem;
        order: 3;
    }
    
    .nav-buttons.active {
        display: flex;
    }
    
    .nav-btn {
        padding: 0.75rem 0;
        text-align: left;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav-btn:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .nav-left {
        gap: 0.5rem;
    }
    
    .nav-logo {
        font-size: 1rem;
    }
    
    .nav-profile-link {
        max-width: 120px;
        font-size: 0.75rem;
    }
    
    .copy-btn {
        padding: 0.2rem;
    }
}

/* Removed - upgrade notice is now integrated into public profile section */

.status-text {
    color: var(--gray);
    font-size: 0.9rem;
    font-style: italic;
}

/* Dashboard */
.dashboard-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    position: relative;
}

.column-label {
    font-size: 0.65rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.2rem 0;
}

.dashboard-column {
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    position: relative;
}

.preview-column {
    text-align: left;
    position: relative;
    border: 1px solid var(--border);
}

.preview-display-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    min-height: 28px;
}

.preview-bio {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    min-height: 60px;
}

.preview-links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

a.preview-text-link {
    font-size: 0.9rem;
    color: #007bff;
    text-decoration: none;
}

a.preview-text-link:hover {
    text-decoration: underline;
}

.preview-social-link {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #007bff;
    text-decoration: none;
}

.preview-social-link:hover {
    text-decoration: underline;
}

.preview-text-only {
    font-size: 0.9rem;
    color: #000;
    margin-bottom: 0.75rem;
}

.preview-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    text-align: left;
    font-size: 0.75rem;
    color: #999;
}

.preview-footer a {
    color: #999;
    text-decoration: underline;
}

.preview-footer a:hover {
    color: #666;
}

/* Controls Column */
.control-section {
    margin-bottom: 1.5rem;
}
.control-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.controls-column {
    font-size: 0.85rem;
    border-radius: 8px;
    padding: 1rem;
    border: 2px solid #007bff;
}

.controls-column .form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    font-size: 0.85rem;
    font-family: inherit;
    border-radius: 3px;
}
.controls-column .form-input:focus {
    outline: none;
    border-color: #007bff;
}

#profileInfoForm .form-input {
    text-align: left;
    border: 1px solid var(--border);
    padding: 0.75rem;
    border-radius: 4px;
}

#profileInfoForm .editable-field:first-of-type {
    margin-bottom: 1rem;
}

#profileInfoForm .form-input:focus {
    background: #f8f8f8;
}
#profileInfoForm input {
    font-size: 1.1rem;
    font-weight: 600;
}
#profileInfoForm textarea {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    resize: none;
    min-height: 60px;
}

#profileInfoForm .form-input::placeholder {
    color: #adb5bd; /* A lighter, more subtle placeholder color */
    opacity: 1; /* Ensures consistency across browsers */
}

.bio-container {
    position: relative;
}

.character-count {
    position: absolute;
    bottom: 0.25rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: #999;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
}

.link-edit-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    position: relative;
}
.link-edit-item input[name="title"] { flex-basis: 35%; }
.link-edit-item input[name="url"] { flex: 1; }

.delete-link-btn {
    visibility: visible;
    background: none;
    border: 1px solid transparent;
    color: #999;
    cursor: pointer;
    border-radius: 3px;
    width: 32px;
    height: 32px;
    font-size: 1rem;
}
.delete-link-btn:hover {
    color: #dc3545;
    background: #fdf2f2;
    border-color: #f5c6cb;
}

#addLinkForm {
    margin-top: 1rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    display: flex;
    gap: 0.5rem;
}
#addLinkForm input[id="newLinkTitle"] { flex-basis: 35%; }
#addLinkForm input[id="newLinkUrl"] { flex: 1; }

.add-button {
    padding: 0.5rem 0.75rem;
    background: #f8f8f8;
    color: #333;
    border: 1px solid #e0e0e0;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 3px;
    white-space: nowrap;
}
.add-button:hover {
    border-color: #333;
}

.add-buttons-container {
    margin-top: 1rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.add-buttons-container .add-button {
    flex: 1;
}

.footer-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 1.5rem;
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .upgrade-notice {
        margin-bottom: 0.4rem;
        padding: 0.6rem 0.8rem;
    }
    
    .upgrade-notice p {
        font-size: 0.8rem;
        line-height: 1.25;
    }
    
    .public-profile-section {
        padding: 0.6rem 0.8rem;
        margin-bottom: 0.6rem;
    }
    
    .public-profile-link-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
    
    .profile-link-left {
        align-self: center;
    }
    
    .pipe-separator {
        display: none;
    }
    
    .upgrade-text {
        font-size: 0.8rem;
        text-align: center;
        align-self: center;
    }
    
    .public-profile-section .public-profile-link {
        max-width: 250px;
        font-size: 0.85rem;
    }
    
    .public-profile-section .copy-btn {
        padding: 0.2rem 0.35rem;
        font-size: 0.85rem;
    }
}

/* Profile info */
.profile-info-section {
    margin-bottom: 2rem;
}

.profile-info-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

.form-input:focus {
    border-color: var(--black);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Auth forms */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
}

.auth-container h1 {
    margin-bottom: 2rem;
    text-align: center;
}

.register-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
}

.auth-button {
    width: 100%;
    padding: 1rem;
    background: var(--black);
    color: var(--white);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    margin: 1rem 0;
}

.auth-button:hover {
    background: var(--gray);
}

.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 0.8rem;
}

.toggle-password:hover {
    color: var(--black);
}

.error-message {
    color: #d32f2f;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.success-message {
    color: #2e7d32;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.forgot-password {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
    display: block;
    margin-top: 1rem;
}

.forgot-password:hover {
    color: var(--black);
    text-decoration: underline;
}

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

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-close:hover {
    color: var(--black);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.delete-button {
    padding: 0.75rem 1rem;
    background: #d32f2f;
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.delete-button:hover {
    background: #b71c1c;
}

/* Settings */
.settings-container {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1rem;
}

.settings-container h1 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.settings-table {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.settings-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.settings-table th {
    background: var(--light-gray);
    padding: 0.6rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.settings-table th:nth-child(1) { width: 18%; }
.settings-table th:nth-child(2) { width: 47%; }
.settings-table th:nth-child(3) { width: 15%; }
.settings-table th:nth-child(4) { width: 20%; }

.settings-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    word-break: break-word;
    font-size: 0.8rem;
    line-height: 1.4;
}

.settings-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    letter-spacing: 0.02em;
}

.status-badge.active {
    color: #28a745;
    background: #d4edda;
    border-color: #c3e6cb;
}

.status-badge.local-auth {
    color: #17a2b8;
    background: #d1ecf1;
    border-color: #bee5eb;
}

.status-badge.irreversible {
    color: #dc3545;
    background: #f8d7da;
    border-color: #f5c6cb;
}

.btn-blue {
    padding: 0.4rem 0.8rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
    min-width: 90px;
    text-align: center;
    font-weight: 500;
}

.btn-blue:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.btn-gray {
    padding: 0.4rem 0.8rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background-color 0.2s;
    min-width: 90px;
    text-align: center;
    font-weight: 500;
}

.btn-gray:hover {
    background: #545b62;
}

.btn-red {
    padding: 0.4rem 0.8rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background-color 0.2s;
    min-width: 90px;
    text-align: center;
    font-weight: 500;
}

.btn-red:hover {
    background: #c82333;
}

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

.modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 380px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: var(--black);
    font-size: 1.1rem;
}

.modal-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
    margin-top: 1.2rem;
}

.modal-buttons button {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.75rem;
    min-width: 80px;
    text-align: center;
    font-weight: 500;
}

.modal-buttons button:hover {
    background: var(--light-gray);
}

.modal-buttons .btn-blue,
.modal-buttons .btn-red {
    border: none;
}

@media (max-width: 992px) {
    .settings-table th,
    .settings-table td {
        padding: 0.5rem;
    }
    
    .settings-table th {
        font-size: 0.7rem;
    }
    
    .settings-table td {
        font-size: 0.75rem;
    }
    
    .btn-blue, .btn-gray, .btn-red {
        padding: 0.35rem 0.7rem;
        font-size: 0.7rem;
        min-width: 80px;
    }
    
    .settings-container h1 {
        font-size: 1.2rem;
    }
}

/* Responsive styles for the settings table */
@media (max-width: 768px) {
    .settings-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .settings-container h1 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .settings-table thead {
        display: none; /* Hide table headers on mobile */
    }

    .settings-table table, 
    .settings-table tbody, 
    .settings-table tr, 
    .settings-table td {
        display: block;
        width: 100%;
    }

    .settings-table tr {
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 5px;
        background: white;
    }

    .settings-table td {
        text-align: right;
        padding: 0.6rem 0.8rem;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #e9ecef;
        font-size: 0.75rem;
    }

    .settings-table td:last-child {
        border-bottom: none;
    }

    .settings-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.8rem;
        width: calc(50% - 1.6rem);
        padding-right: 10px;
        text-align: left;
        font-weight: 600;
        font-size: 0.7rem;
        color: #666;
    }
    
    .btn-blue, .btn-gray, .btn-red {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-width: 100px;
        width: 100%;
        margin-top: 0.3rem;
    }
    
    .status-badge {
        font-size: 0.6rem;
        padding: 0.12rem 0.35rem;
    }
    
    .modal-content {
        padding: 1.2rem;
        max-width: 320px;
    }
    
    .modal-content h3 {
        font-size: 1rem;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-buttons button {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .settings-container {
        padding: 0 0.3rem;
    }
    
    .settings-table td {
        padding: 0.5rem 0.6rem;
        padding-left: 45%;
        font-size: 0.7rem;
    }
    
    .settings-table td::before {
        left: 0.6rem;
        width: calc(45% - 1.2rem);
        font-size: 0.65rem;
    }
    
    .btn-blue, .btn-gray, .btn-red {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }
    
    .status-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.3rem;
    }
}

/* User profile section */
.user-profile-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.user-profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile-username {
    color: var(--gray);
    font-size: 0.9rem;
}

.share-profile-btn {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--black);
}

.share-profile-btn:hover {
    border-color: var(--black);
}

/* Remove stars decoration */
.stars {
    display: none;
}

.delete-warning {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #dc3545;
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: #dc3545;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
}

.delete-warning.show {
    display: block;
}

.delete-warning-buttons {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.delete-warning-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 2px;
    font-size: 0.7rem;
    cursor: pointer;
}

.delete-warning-btn.confirm {
    background: #dc3545;
    color: white;
}

.delete-warning-btn.cancel {
    background: #6c757d;
    color: white;
}

.save-btn {
    position: absolute;
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 5;
    transition: background-color 0.2s;
}

.save-btn:hover {
    background: #0056b3;
}

.save-btn-top {
    top: -0.5rem;
    right: 0;
}

.save-btn-bottom {
    bottom: -3rem;
    right: 0;
}

.save-section {
    text-align: center;
    padding: 1rem 0 0.5rem;
}

.save-btn-small {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-btn-small:hover {
    background: #0056b3;
}

/* Pricing Page */
.pricing-container {
    max-width: 500px;
    margin: 1rem auto;
    padding: 0 1rem;
    text-align: center;
}

.pricing-subtitle {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Simple Plan Box */
.simple-plan-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    margin: 0 auto 2rem;
    text-align: left;
}

/* Plan Header */
.plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.simple-plan-box h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--black);
    font-weight: 600;
}

/* Small Toggle */
.small-toggle {
    display: flex;
    background: #e9ecef;
    border-radius: 4px;
    padding: 2px;
}

.toggle-option {
    padding: 0.3rem 0.6rem;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #6c757d;
    transition: all 0.2s;
}

.toggle-option.active {
    background: white;
    color: var(--black);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Pricing Section */
.pricing-section {
    margin-bottom: 1rem;
}

.price-line {
    font-size: 1.1rem;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.crossed-price {
    text-decoration: line-through;
    color: var(--gray);
    margin-right: 0.5rem;
}

.price-note {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

/* Plan Description */
.plan-description {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 1.5rem 0;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    padding: 0.4rem 0;
    position: relative;
    padding-left: 1.2rem;
    font-size: 0.95rem;
    color: var(--black);
}

.feature-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--black);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.plan-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    color: #6366f1;
    border: 1px solid #6366f1;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    display: inline-block;
}

.plan-btn:hover {
    background: #6366f1;
    color: white;
}

/* Single button for annual users */
.button-group .plan-btn:only-child {
    background: #6366f1;
    color: white;
}

.button-group .plan-btn:only-child:hover {
    background: #5855eb;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.pricing-faq {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.pricing-faq h3 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.faq-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.faq-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--black);
    font-size: 0.9rem;
}

.faq-item p {
    color: var(--gray);
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.selected-plan {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.selected-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #007bff;
    margin: 0;
}

.payment-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.payment-info p {
    margin: 0.5rem 0;
}

.upgrade-prompt {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
}

.upgrade-prompt h2 {
    margin-bottom: 1rem;
    color: var(--black);
}

.upgrade-prompt p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.upgrade-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.upgrade-btn:hover {
    background: #0056b3;
}

@media (max-width: 768px) {
    .pricing-plans {
        grid-template-columns: 1fr;
    }
    
    .pricing-plan.featured {
        transform: none;
    }
    
    .plan-price .price {
        font-size: 2rem;
    }
}

/* Public Profile Page */
.public-profile-container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1rem 2rem;
}

.public-profile-content {
    max-width: 400px;
    width: 100%;
    text-align: left;
    padding: 1.5rem;
}

.settings-table td form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
    max-width: 100%;
    word-break: break-word;
}

.settings-table td input[type="text"],
.settings-table td input[type="email"] {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.settings-table td button {
    margin-top: 6px;
    width: fit-content;
    min-width: 100px;
}

/* Settings Page Form Styles */
.settings-profile-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-form-group label {
    font-weight: bold;
    font-size: 0.85em;
    color: #333;
}

.settings-form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
}

.form-hint {
    font-size: 0.8em;
    color: #888;
}

.settings-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-action-buttons button {
    width: 100%;
    box-sizing: border-box;
}

/* Locked Account Notice */
.locked-account-notice {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
}

.locked-message {
    color: #721c24;
}

.locked-message i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.locked-message strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.locked-message p {
    margin: 0;
    font-size: 0.95rem;
}

.locked-message a {
    color: #721c24;
    text-decoration: underline;
}

.locked-message a:hover {
    color: #5a1a1f;
}

/* Public Profile Link Section */
.public-profile-section {
    grid-column: 1 / -1;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    text-align: left;
}

.public-profile-link-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.profile-link-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pipe-separator {
    color: var(--gray);
    font-size: 1rem;
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.upgrade-text {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.upgrade-text a {
    color: #007bff;
    text-decoration: none;
}

.example-bio-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.example-bio-link:hover {
    text-decoration: underline;
}

.upgrade-text a:hover {
    text-decoration: underline;
}

.public-profile-section .copy-btn {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.public-profile-section .copy-btn:hover {
    background: #e9ecef;
    color: var(--black);
}

.public-profile-section .public-profile-link {
    color: #007bff;
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.update-username-link {
    margin-left: 8px;
    font-size: 0.9em;
    color: #6B7280;
    text-decoration: none;
}
.update-username-link:hover {
    text-decoration: underline;
}

.public-profile-section .public-profile-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .public-profile-section {
        padding: 0.6rem 0.8rem;
        margin-bottom: 0.6rem;
    }
    
    .public-profile-link-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
    
    .profile-link-left {
        align-self: center;
    }
    
    .pipe-separator {
        display: none;
    }
    
    .upgrade-text {
        font-size: 0.8rem;
        text-align: center;
        align-self: center;
    }
    
    .public-profile-section .public-profile-link {
        max-width: 250px;
        font-size: 0.85rem;
    }
    
    .public-profile-section .copy-btn {
        padding: 0.2rem 0.35rem;
        font-size: 0.85rem;
    }
}

.public-profile-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #aaa;
    text-align: left;
}

@media (max-width: 500px) {
    .public-profile-footer {
        font-size: 0.85rem;
    }
} 

/* Dashboard specific styles - Force left alignment */
.dashboard-container .controls-column {
    font-size: 0.85rem;
    border-radius: 8px;
    padding: 1rem;
    border: 2px solid #007bff !important;
    background: #ffffff;
}

.dashboard-container #profileInfoForm .form-input {
    text-align: left !important;
    border: none;
    padding: 0.25rem 0;
}

.dashboard-container #profileInfoForm input[name="display_name"] {
    text-align: left !important;
}

.dashboard-container #profileInfoForm textarea[name="bio_text"] {
    text-align: left !important;
}

/* Force left alignment for all profile form inputs */
#profileInfoForm input[type="text"],
#profileInfoForm textarea {
    text-align: left !important;
}

/* Specific targeting for display name and bio inputs */
input[name="display_name"],
textarea[name="bio_text"] {
    text-align: left !important;
}

.public-profile-link-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.upgrade-text {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
} 

/* Copy button success message styling */
.copy-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 9999;
    font-size: 0.9em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        -webkit-transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        -webkit-transform: translateX(0);
        opacity: 1;
    }
} 

/* Interactive Editable Fields */
.editable-field {
    position: relative;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
}

.editable-field:hover {
    background-color: #f8f9fa; /* A very light grey */
}

.editable-field .edit-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd; /* A light grey for the icon */
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.editable-field:hover .edit-indicator {
    opacity: 1;
}

.editable-field:hover input,
.editable-field:hover textarea {
    cursor: text;
}

/* Pulsating border for new users */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
        -webkit-box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
        -webkit-box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
        -webkit-box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.new-user-pulse {
    animation: pulse-border 2s infinite;
} 

.public-profile-split {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 1rem;
}

.claim-username-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #e8f0fe;
    color: #1967d2;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.claim-username-link:hover {
    background-color: #d0e0fd;
    color: #174ea6;
}

.claim-username-link i {
    margin-right: 0.5rem;
} 