/* Link Preview Container */
.link-preview-container {
    min-height: 100vh;
    background: var(--theme-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    padding: 2rem 1rem;
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--theme-text, #111827);
}

/* Container - exact match to public page */
.container {
    max-width: 680px;
    margin: 0 auto;
}

/* Header - exact match to public page */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Avatar Classic Layout */
.avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    background: white;
}

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

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

/* Avatar Hero Layout */
.avatar-hero {
    width: 100%;
    height: 200px;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

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

.avatar-hero .avatar-fallback {
    font-size: 4rem;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--theme-text, white);
    margin-bottom: 0.5rem;
}

.title-logo {
    max-width: 200px;
    max-height: 80px;
    margin: 0 auto 0.5rem;
    display: block;
}

.bio {
    color: var(--theme-text, rgba(255, 255, 255, 0.9));
    font-size: 1rem;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

/* Blocks Container */
.blocks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Block - exact match to public page */
.block {
    background: var(--theme-button, #ffffff);
    color: var(--theme-button-text, inherit);
    border-radius: 12px;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}

/* Button Style: Solid (default) */
.block.button-solid {
    background: var(--theme-button, #ffffff);
    color: var(--theme-button-text, inherit);
}

/* Button Style: Glass */
.block.button-glass {
    background: color-mix(in srgb, var(--theme-button, #ffffff) 20%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--theme-button, #ffffff);
    color: var(--theme-button, #000000);
}

.block.button-glass .block-text h3,
.block.button-glass .block-text p {
    color: inherit;
}

/* Button Style: Outline */
.block.button-outline {
    background: transparent;
    border: 2px solid var(--theme-button, #ffffff);
    color: var(--theme-button, #000000);
}

.block.button-outline .block-text h3,
.block.button-outline .block-text p {
    color: inherit;
}

/* Button Corners: Round (default) */
.block.button-round {
    border-radius: 12px;
}

/* Button Corners: Square */
.block.button-square {
    border-radius: 6px;
}

/* Button Shadow: None (default) */
.block.shadow-none {
    box-shadow: none;
}

.block.shadow-none:hover {
    box-shadow: none;
}

/* Button Shadow: Subtle */
.block.shadow-subtle {
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06);
}

.block.shadow-subtle:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
}

/* Button Shadow: Strong */
.block.shadow-strong {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
}

.block.shadow-strong:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
}

/* Button Shadow: Hard */
.block.shadow-hard {
    box-shadow: 4px 4px 0 var(--theme-button-shadow, var(--theme-button, #3b82f6));
}

.block.shadow-hard:hover {
    box-shadow: 6px 6px 0 var(--theme-button-shadow, var(--theme-button, #3b82f6));
    transform: translate(-1px, -1px);
}

/* Default hover for blocks without hard shadow */
.block:not(.shadow-hard):hover {
    transform: translateY(-2px);
}

.block-link .block-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.block-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.block-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #4b5563;
    flex-shrink: 0;
}

.block-icon.file {
    background: #dbeafe;
    color: #3b82f6;
}

.block-text {
    flex: 1;
    min-width: 0;
}

.block-text h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--theme-button-text, inherit);
}

.block-text p {
    font-size: 0.875rem;
    color: var(--theme-button-text, #6b7280);
    opacity: 0.8;
    line-height: 1.4;
}

.block-arrow {
    color: #9ca3af;
    flex-shrink: 0;
    transition: all 0.2s;
}

.block:hover .block-arrow {
    color: #3b82f6;
    transform: translateX(4px);
}

/* Featured Link Block */
.block-featured {
    overflow: hidden;
}

.featured-image {
    position: relative;
    height: 256px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.featured-overlay.dark {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
}

.featured-overlay.light {
    background: rgba(255, 255, 255, 0.9);
    color: #111827;
}

.featured-overlay.gradient {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.featured-overlay h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.featured-overlay p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.featured-placeholder {
    height: 256px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #6b7280;
}

.featured-placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

.featured-placeholder p {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Header Block */
.block-header {
    padding: 1.5rem 0;
}

.block-header.center {
    text-align: center;
}

.block-header.right {
    text-align: right;
}

.block-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
}

.block-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.block-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

.block-header hr {
    margin-top: 0.75rem;
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

/* Group Block */
.block-group {
    padding: 1.5rem;
}

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

.group-header i {
    color: #6b7280;
}

.group-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.group-desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.group-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.group-links.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.group-links.compact {
    flex-direction: row;
    flex-wrap: wrap;
}

.group-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.group-link:hover {
    background: #f3f4f6;
    color: #3b82f6;
}

.group-link img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.group-link i {
    color: #6b7280;
}

.group-link:hover i {
    color: #3b82f6;
}

/* Text Block */
.block-text-content {
    padding: 1rem;
    background: #ffffff;
    border-radius: 12px;
    color: #111827;
}

.block-text-content.center {
    text-align: center;
}

.block-text-content.right {
    text-align: right;
}

.block-text-content.callout {
    background: #dbeafe;
    color: #1e40af;
    padding: 1rem;
}

.block-text-content.quote {
    border-left: 4px solid rgba(255, 255, 255, 0.5);
    padding-left: 1rem;
    font-style: italic;
}

.block-text-content p {
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Image Block */
.block-image {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.block-image.small {
    max-width: 320px;
}

.block-image.medium {
    max-width: 448px;
}

.block-image.large {
    max-width: 672px;
}

.block-image.left {
    margin-right: auto;
}

.block-image.center {
    margin: 0 auto;
}

.block-image.right {
    margin-left: auto;
}

.block-image img {
    width: 100%;
    height: auto;
}

.image-caption {
    padding: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
}

.image-placeholder {
    height: 200px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.image-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

/* File Block */
.block-file .block-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.file-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Video & Music Blocks */
.block-video,
.block-music {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.video-header,
.music-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.video-header h3,
.music-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.video-header p {
    font-size: 0.875rem;
    color: #6b7280;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.music-embed {
    height: 320px;
}

.music-embed.compact {
    height: 80px;
}

.music-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Spacer Block */
.block-spacer {
    width: 100%;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: white;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.footer a {
    color: white;
    font-weight: 600;
    text-decoration: none;
}

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

.footer p {
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .link-preview-container {
        padding: 1rem 0.5rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .avatar-hero {
        height: 150px;
    }

    .group-links.grid {
        grid-template-columns: 1fr;
    }
}
