:root {
    --primary: #E84393;
    --primary-hover: #D63080;
    --secondary: #FD79A8;
    --accent: #00CEC9;
    --bg-main: #1A0A14;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-input: rgba(0, 0, 0, 0.3);
    --border: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(232, 67, 147, 0.5);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --error: #FF5252;
    --success: #00E676;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(232, 67, 147, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 206, 201, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

header {
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Forms & Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    overflow: hidden;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 67, 147, 0.2);
}

.acct-prefix {
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
    user-select: none;
}

input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.1rem;
    padding: 1.25rem 0.5rem;
    outline: none;
    width: 100%;
}

input[type="text"]::placeholder {
    color: var(--text-muted);
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
    transition: var(--transition-normal);
}

#lookup-btn {
    background: var(--primary);
    color: white;
    height: 100%;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lookup-btn:hover {
    background: var(--primary-hover);
}

#lookup-btn:active {
    transform: scale(0.98);
}

#lookup-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.error-message {
    color: var(--error);
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.2);
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

/* Loading State */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Results Area */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease;
}

.profile-card, .links-card, .json-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.avatar-container {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.avatar-placeholder {
    color: var(--text-muted);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.profile-subject {
    color: var(--accent);
    font-family: monospace;
    font-size: 0.95rem;
}

.profile-details h3, .links-card h3, .json-header h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.links-list li {
    word-break: break-all;
}

.links-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.links-list a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.link-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.link-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
}

.link-rel {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
}

.link-href {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-href:hover {
    text-decoration: underline;
}

/* JSON Output */
.json-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.json-header h3 {
    margin-bottom: 0;
}

.icon-btn {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.string { color: #8BE9FD; }
.number { color: #BD93F9; }
.boolean { color: #FF79C6; }
.null { color: #F1FA8C; }
.key { color: #50FA7B; }

footer {
    margin-top: auto;
    text-align: center;
    padding-top: 2.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Utilities */
[hidden] {
    display: none !important;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
}
