/* CSS Variables from Design System */
:root {
    --bg-color: #FAFAFA;
    --text-primary: #18181B;
    --text-secondary: #3F3F46;
    --cta-color: #2563EB;
    --cta-hover: #1D4ED8;
    --card-bg: #FFFFFF;
    --border-color: rgba(0, 0, 0, 0.05);
    
    --font-heading: 'Archivo', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- Blockers --- */
.blocker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.blocker-overlay.hidden {
    display: none;
}

.blocker-content {
    max-width: 400px;
}

.blocker-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blocker-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cta-button {
    background-color: var(--cta-color);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta-button:active {
    transform: scale(0.95);
}

/* PC Blocker Logic */
#desktop-blocker {
    display: none; /* Hidden on mobile */
}

@media (min-width: 768px) {
    #desktop-blocker {
        display: flex; /* Visible on desktop */
    }
    #app-container {
        display: none !important; /* Completely hide app on desktop */
    }
}

/* --- Main App --- */
#app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Header */
.profile-header {
    text-align: center;
}

/* Video Container */
.video-container {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateZ(0); /* Force hardware acceleration for smooth video edges */
    position: relative;
}

.hero-video {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.mute-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.mute-btn:active {
    transform: scale(0.95);
}

.mute-btn svg {
    width: 20px;
    height: 20px;
}

.mute-btn .hidden {
    display: none;
}

.avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
    border: 3px solid #fff;
}

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

.name {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.role {
    color: var(--cta-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.bio {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

/* Links Section */
.links-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    will-change: transform;
}

.link-card:active {
    transform: scale(0.97);
}

.link-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
}

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

.link-icon {
    font-size: 1.5rem;
    background-color: var(--bg-color);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.link-text h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.link-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.arrow {
    color: var(--cta-color);
    font-weight: bold;
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-top: 1rem;
}

/* API Section Styles for anime.html */
.api-section {
    margin-bottom: 2.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
}

.api-badge {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--cta-color);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.media-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-card:active {
    transform: scale(0.97);
}

.media-img-container {
    width: 100%;
    aspect-ratio: 2 / 3;
    position: relative;
    background: #e4e4e7;
}

.media-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-score {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #F59E0B;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.media-info {
    padding: 0.85rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.media-info h4 {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-body);
}

.loading-text, .error-text {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 3rem 0;
}

.error-text {
    color: #DC2626;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--delay, 0s);
}

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-up {
        animation: none;
        opacity: 1;
    }
    .link-card {
        transition: none;
    }
}
