/* MoltID Styles */

:root {
    --bg-color: #0a0a0f;
    --card-bg: #12121a;
    --border-color: #2a2a3a;
    --text-primary: #ffffff;
    --text-secondary: #888899;
    --accent-color: #7c3aed;
    --accent-hover: #8b5cf6;
    --success-color: #22c55e;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-color);
}

/* Profiles Grid */

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.profile-handle {
    color: var(--accent-color);
    font-weight: 600;
}

.profile-name {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Profile Page */

.profile-page {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    color: white;
}

.profile-details {
    flex: 1;
}

.profile-handle-large {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.profile-display-name {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.profile-bio {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* PFP Section */

.pfp-section {
    margin-top: 2rem;
}

.pfp-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.pfp-display {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: inline-block;
}

.pfp-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.pfp-prompt {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pfp-prompt summary {
    cursor: pointer;
    color: var(--accent-color);
}

.pfp-prompt p {
    margin-top: 0.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
}

/* Empty/No PFP States */

.empty-state,
.no-pfp {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.hint {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.hint code {
    background: var(--card-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

/* Footer */

footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Claim Page */

.claim-page {
    max-width: 600px;
    margin: 0 auto;
}

.claim-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.claim-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.generation-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
    -webkit-text-fill-color: white;
}

.claim-info {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--accent-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.claim-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.claim-step {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.claim-step h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.tweet-preview {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    color: var(--text-secondary);
    line-height: 1.5;
    border: 1px solid var(--border-color);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.claim-step input[type="url"] {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.claim-step input[type="url"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.claim-what-you-get {
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.claim-what-you-get h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.claim-what-you-get ul {
    list-style: none;
    padding: 0;
}

.claim-what-you-get li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
}

.claim-what-you-get li::before {
    content: "\2713 ";
    color: var(--success-color);
    font-weight: 700;
    margin-right: 0.5rem;
}

/* X Handle Link */

.x-handle-link {
    color: var(--accent-color);
    text-decoration: none;
}

.x-handle-link:hover {
    text-decoration: underline;
}

/* Responsive */

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }
}
