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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a2634 50%, #0f1419 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem 0;
}

.container {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.08);
    max-width: 400px;
    width: 92%;
}

h1 {
    color: #0f1419;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: #536471;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

p:last-child {
    margin-bottom: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #0f1419;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #272c30;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 20, 25, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background-color: #00ba7c;
    color: #ffffff;
}

.btn-success:disabled {
    opacity: 0.9;
    cursor: default;
}

.checkmark {
    font-weight: bold;
}

/* Profile Page Styles */
.profile-container {
    max-width: 450px;
}

/* Radio Button Group */
.radio-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #0f1419;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0f1419;
}

.radio-text {
    font-size: 0.95rem;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-field {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #cfd9de;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
    border-color: #0f1419;
    box-shadow: 0 0 0 2px rgba(15, 20, 25, 0.15);
}

.input-field::placeholder {
    color: #8899a6;
}

/* Loading Indicator */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    color: #536471;
    font-size: 0.9rem;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid #e1e8ed;
    border-top-color: #0f1419;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Error Message */
.error-message {
    padding: 0.75rem 1rem;
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 12px;
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Profile Card */
.profile-card {
    padding: 1.5rem;
    background-color: #f7f9fa;
    border-radius: 16px;
    border: 1px solid #e1e8ed;
}

/* X Logo Profile Image */
.profile-image-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #0f1419;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(15, 20, 25, 0.2);
}

.profile-x-logo {
    width: 40px;
    height: 40px;
    fill: #ffffff;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-info {
    margin-bottom: 1rem;
}

.profile-name {
    font-size: 1.25rem;
    color: #0f1419;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.profile-username {
    font-size: 0.95rem;
    color: #536471;
    margin-bottom: 0.25rem;
}

.profile-bio {
    font-size: 0.9rem;
    color: #536471;
    line-height: 1.4;
}

/* Verified Badge */
.profile-verified {
    display: inline-block;
    background-color: #0f1419;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Bio Section */
.profile-bio-section {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.profile-bio {
    font-size: 0.9rem;
    color: #536471;
    line-height: 1.5;
    text-align: left;
    margin-bottom: 0;
}

/* Profile Stats */
.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    margin: 1rem 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0.25rem 0;
}

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

.stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f1419;
}

.stat-label {
    font-size: 0.7rem;
    color: #536471;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Profile Meta */
.profile-meta {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.connected-at,
.account-created {
    font-size: 0.82rem;
    color: #536471;
    margin-bottom: 0.25rem;
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Profile Actions */
.profile-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Disclaimer Section */
.disclaimer-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e1e8ed;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.disclaimer {
    font-size: 0.85rem;
    color: #536471;
    margin-bottom: 0;
}

.btn-secondary {
    background-color: #536471;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #3d4f5b;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: #0f1419;
    border: 1.5px solid #cfd9de;
}

.btn-outline:hover {
    background-color: #f7f9fa;
    border-color: #0f1419;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    width: auto;
}

/* Success Message */
.success-message {
    padding: 0.75rem 1rem;
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Wallet Section */
.wallet-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.wallet-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f1419;
    margin-bottom: 1rem;
    text-align: left;
}

.wallet-section h4 {
    font-size: 0.95rem;
    color: #536471;
    margin-bottom: 0.75rem;
    text-align: left;
}

/* Wallet List */
.wallet-list {
    margin-bottom: 1rem;
}

.no-wallets {
    padding: 1rem;
    text-align: center;
    color: #8899a6;
    font-size: 0.9rem;
}

.no-wallets p {
    margin-bottom: 0;
}

.wallet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #f7f9fa;
    border-radius: 10px;
    border: 1px solid #e1e8ed;
}

.wallet-item:last-child {
    margin-bottom: 0;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.wallet-chain {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0f1419;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-address {
    font-size: 0.82rem;
    color: #536471;
    font-family: 'Courier New', monospace;
}

.btn-delete {
    background-color: transparent;
    color: #f4212e;
    border: 1.5px solid #fecaca;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-delete:hover {
    background-color: #fef2f2;
    border-color: #f4212e;
}

/* Add Wallet Form */
.add-wallet-form {
    padding: 0;
    background-color: transparent;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f1419;
    margin-bottom: 0.5rem;
}

/* Chain Selector */
.chain-selector {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.chain-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #0f1419;
}

.chain-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0f1419;
}

.chain-option span {
    font-size: 0.9rem;
}

/* Wallet Input */
.wallet-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border: 1px solid #cfd9de;
    border-radius: 8px;
    outline: none;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wallet-input:focus {
    border-color: #0f1419;
    box-shadow: 0 0 0 2px rgba(15, 20, 25, 0.15);
}

.wallet-input::placeholder {
    color: #8899a6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Onboarding Screens */
.onboarding-screen {
    padding: 1.5rem 0;
}

.onboarding-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f1419;
    margin-bottom: 0.75rem;
}

.onboarding-description {
    font-size: 0.95rem;
    color: #536471;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cfd9de;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #0f1419;
    width: 24px;
    border-radius: 4px;
}

/* Posts Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    width: 92%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    z-index: 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    color: #0f1419;
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: #f7f9fa;
    border: none;
    color: #536471;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    line-height: 1;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #e1e8ed;
    color: #0f1419;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-item {
    background: #f7f9fa;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e1e8ed;
    transition: border-color 0.2s;
}

.post-item:hover {
    border-color: #cfd9de;
}

.post-text {
    color: #0f1419;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.post-stats {
    display: flex;
    gap: 20px;
}

.post-stat {
    color: #536471;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.posts-search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.posts-search-input {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border: 1px solid #cfd9de;
    border-radius: 9999px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.posts-search-input:focus {
    border-color: #0f1419;
    box-shadow: 0 0 0 2px rgba(15, 20, 25, 0.15);
}

/* Success Text */
.success-text {
    color: #065f46;
    font-weight: 600;
}

/* Linked Info */
.linked-info {
    color: #536471;
    font-size: 0.95rem;
}

/* Already Linked Section (Login page) */
#already-linked-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#already-linked-section .disclaimer {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Not Linked Section (Login page) */
#not-linked-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Not Linked Section (Profile page) */
#not-linked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
