* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

/* Landing Page (legacy fallback) */
.landing-page:not(:has(.ldb-wrap)) {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-container {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
}

.landing-container h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.landing-container p {
    opacity: 0.8;
    margin-bottom: 2rem;
}

.landing-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.landing-link {
    display: block;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
}

.landing-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.admin-link {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
}

.admin-link:hover {
    color: #fff;
}

/* Bio Page */
.bio-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.bio-container {
    width: 100%;
    max-width: 680px;
    text-align: center;
}

.bio-logo {
    display: block;
    width: 130px;
    height: 130px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.12);
    background-color: #ffffff;
}

.bio-instagram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    transition: opacity 0.2s;
    line-height: 1.2;
    overflow: visible;
}

.bio-instagram:hover {
    opacity: 1;
}

.bio-instagram:hover .bio-instagram__handle {
    text-decoration: underline;
}

.bio-instagram__verified {
    width: 1.08em;
    height: 1.08em;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    align-self: center;
    transform: translate(-2px, 1px);
}

.bio-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.bio-description {
    opacity: 0.85;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.bio-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.bio-video-wrap {
    width: 100%;
}

.bio-card-wrap {
    width: 100%;
}

.bio-card {
    width: 100%;
    padding: 1.25rem 1.35rem;
    border-radius: inherit;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-align: left;
    line-height: 1.55;
    box-sizing: border-box;
}

.bio-card-wrap[data-card-transparent] .bio-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-left: 0;
    padding-right: 0;
}

.bio-card-wrap[data-custom-colors] .bio-card {
    background-color: var(--button-bg) !important;
    color: var(--button-text) !important;
}

.bio-card__content {
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.bio-card__content p,
.bio-card__content ul,
.bio-card__content ol,
.bio-card__content blockquote,
.bio-card__content h1,
.bio-card__content h2,
.bio-card__content h3 {
    margin: 0 0 0.75rem;
}

.bio-card__content p:last-child,
.bio-card__content ul:last-child,
.bio-card__content ol:last-child,
.bio-card__content blockquote:last-child,
.bio-card__content h1:last-child,
.bio-card__content h2:last-child,
.bio-card__content h3:last-child {
    margin-bottom: 0;
}

.bio-card__content a {
    color: inherit;
    text-decoration: underline;
}

.bio-card__content .ql-align-center { text-align: center; }
.bio-card__content .ql-align-right { text-align: right; }
.bio-card__content .ql-align-justify { text-align: justify; }

.bio-card__content .ql-font-Inter { font-family: 'Inter', sans-serif; }
.bio-card__content .ql-font-Roboto { font-family: 'Roboto', sans-serif; }
.bio-card__content .ql-font-Open\ Sans { font-family: 'Open Sans', sans-serif; }
.bio-card__content .ql-font-Lato { font-family: 'Lato', sans-serif; }
.bio-card__content .ql-font-Montserrat { font-family: 'Montserrat', sans-serif; }
.bio-card__content .ql-font-Poppins { font-family: 'Poppins', sans-serif; }
.bio-card__content .ql-font-Nunito { font-family: 'Nunito', sans-serif; }
.bio-card__content .ql-font-Raleway { font-family: 'Raleway', sans-serif; }
.bio-card__content .ql-font-Oswald { font-family: 'Oswald', sans-serif; }
.bio-card__content .ql-font-Merriweather { font-family: 'Merriweather', serif; }
.bio-card__content .ql-font-Playfair\ Display { font-family: 'Playfair Display', serif; }

.bio-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 15px;
    overflow: hidden;
}

.bio-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.bio-button-wrap {
    width: 100%;
}

.bio-button-wrap.has-photo {
    margin-top: 2.5rem;
}

.bio-button-wrap.has-photo:first-child {
    margin-top: 1.5rem;
}

.bio-button,
.bio-group-toggle,
.bio-subbutton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-family: inherit;
    box-sizing: border-box;
    position: relative;
}

.bio-button-wrap.has-photo .bio-button,
.bio-button-wrap.has-photo .bio-subbutton,
.bio-button-wrap.has-photo .bio-group-toggle {
    flex-direction: column;
    padding-top: 2.75rem;
    padding-bottom: 1rem;
    gap: 0.35rem;
}

.btn-photo {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    border: 3px solid color-mix(in srgb, var(--button-bg, #ffffff) 75%, #000000 25%);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--button-bg, #ffffff) 90%, #ffffff 10%),
                0 3px 12px rgba(0, 0, 0, 0.15);
    background-color: #fff;
}

.bio-group {
    width: 100%;
}

.bio-group-toggle {
    justify-content: center;
    padding-left: 2.35rem;
    padding-right: 2.35rem;
}

.bio-group-toggle:hover,
.bio-group-toggle:active,
.bio-group-toggle:focus-visible {
    opacity: 1;
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.group-arrow {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-55%) rotate(45deg);
    opacity: 0.45;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.bio-group.is-open .group-arrow {
    transform: translateY(-45%) rotate(225deg);
}

.bio-button-wrap.has-photo .bio-group-toggle .group-arrow {
    top: auto;
    bottom: 1rem;
    transform: rotate(45deg);
}

.bio-button-wrap.has-photo .bio-group.is-open .group-arrow {
    transform: rotate(225deg);
}

.bio-subbuttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.bio-subbutton {
    justify-content: center;
    padding-left: 2.35rem;
    padding-right: 2.35rem;
    background-color: color-mix(in srgb, var(--button-bg, #ffffff) 80%, transparent);
}

.bio-subbutton:hover {
    background-color: color-mix(in srgb, var(--button-bg, #ffffff) 90%, transparent);
}

.bio-subbutton .sub-button-marker {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
}

.bio-button-wrap.has-photo .bio-subbutton .sub-button-marker {
    top: auto;
    bottom: 1rem;
    transform: none;
}

.sub-button-marker {
    display: inline-flex;
    align-items: center;
    gap: 0.12rem;
    flex-shrink: 0;
    opacity: 0.45;
    color: inherit;
}

.sub-button-marker__arrow {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    border-radius: 0 0 0 1px;
    margin-top: -0.12rem;
}

.sub-button-marker__circle {
    width: 0.4rem;
    height: 0.4rem;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    box-sizing: border-box;
}

.bio-subbuttons .bio-button-wrap.has-photo {
    margin-top: 2.5rem;
}

.bio-button-wrap[data-custom-colors] .bio-button,
.bio-button-wrap[data-custom-colors] .bio-group-toggle {
    background-color: var(--button-bg) !important;
    color: var(--button-text) !important;
}

.bio-button-wrap[data-custom-colors] .bio-subbutton {
    background-color: color-mix(in srgb, var(--button-bg) 80%, transparent) !important;
    color: var(--button-text) !important;
}

.bio-button-wrap[data-custom-colors] .bio-subbutton:hover {
    background-color: color-mix(in srgb, var(--button-bg) 90%, transparent) !important;
}

.bio-button-wrap[data-custom-typography] .bio-button,
.bio-button-wrap[data-custom-typography] .bio-group-toggle,
.bio-button-wrap[data-custom-typography] .bio-subbutton {
    font-family: var(--button-font) !important;
    font-weight: var(--button-font-weight) !important;
    font-style: var(--button-font-style) !important;
    text-decoration: var(--button-text-decoration) !important;
}

.btn-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.bio-button-wrap.has-icon-left .bio-button,
.bio-button-wrap.has-icon-left .bio-subbutton,
.bio-button-wrap.has-icon-left .bio-group-toggle {
    padding-left: 2.35rem;
}

.bio-button-wrap.has-icon-left .btn-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
}

.bio-button-wrap.has-photo.has-icon-left .btn-icon {
    top: auto;
    bottom: 1rem;
    transform: none;
}

.no-buttons {
    opacity: 0.7;
    padding: 2rem;
}

.bio-footer {
    margin-top: 2rem;
    opacity: 0.5;
    font-size: 0.8rem;
}

.bio-footer a {
    color: inherit;
    text-decoration: none;
}

.bio-footer a:hover {
    opacity: 1;
}

/* Error Page */
.error-page {
    background: #1a1a2e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-container {
    text-align: center;
}

.error-container h1 {
    font-size: 5rem;
    font-weight: 800;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    margin-top: 1rem;
    display: inline-block;
}

/* Responsive */
@media (max-width: 480px) {
    .bio-name {
        font-size: 1.25rem;
    }
    .bio-logo {
        width: 110px;
        height: 110px;
        border-width: 3px;
    }
    .bio-button,
    .bio-group-toggle,
    .bio-subbutton {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    .bio-button-wrap.has-photo .bio-button,
    .bio-button-wrap.has-photo .bio-subbutton,
    .bio-button-wrap.has-photo .bio-group-toggle {
        padding-top: 2.5rem;
        padding-bottom: 0.875rem;
    }

    .btn-photo {
        width: 64px;
        height: 64px;
    }
}
