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

:root {
    --bg-dark: #07060b;
    --bg-card: rgba(15, 14, 20, 0.9);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-tertiary: rgba(255, 255, 255, 0.6);
    --accent-purple: #8b5cf6;
    --accent-magenta: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Gradient */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
        var(--bg-dark);
    z-index: 0;
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

@media (max-width: 767px) {
    .container {
        align-items: flex-start;
        padding-top: max(12px, env(safe-area-inset-top));
    }
}

/* Main Card - Unified Container */
.main-card {
    width: 100%;
    max-width: 420px;
    background: transparent;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Photo Section */
.photo-section {
    width: 100%;
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    border-radius: 32px 32px 0 0;
    flex-shrink: 0;
    background: transparent;
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(15, 14, 20, 0.95) 0%, rgba(15, 14, 20, 0.7) 50%, transparent 100%);
    pointer-events: none;
}

/* Content Section */
.content-section {
    width: 100%;
    padding: 36px 28px;
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 0 0 32px 32px;
    border-top: 1px solid var(--glass-border);
    position: relative;
    margin-top: -1px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.card-header {
    text-align: center;
    margin-bottom: 24px;
}

.name {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.handle {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.bio {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.social-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: transform 0.2s ease, background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.2);
    opacity: 0;
    transform: scale(0);
    animation: iconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    will-change: transform;
    touch-action: manipulation;
}

.social-icon:nth-child(1) { animation-delay: 0.2s; }
.social-icon:nth-child(2) { animation-delay: 0.3s; }
.social-icon:nth-child(3) { animation-delay: 0.4s; }

@keyframes iconPop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.social-icon:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.social-icon:active {
    transform: scale(0.98);
}

.social-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--text-primary);
}

/* Promo Section */
.promo-section {
    text-align: center;
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.promo-badge {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
    margin-bottom: 12px;
    text-transform: uppercase;
    will-change: transform;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6);
        transform: scale(1.01);
    }
}

.promo-subtext {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.promo-urgency {
    font-size: 12px;
    color: var(--accent-magenta);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
    opacity: 0.9;
}

.countdown {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.countdown.hidden {
    display: none;
}

/* Links */
.links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.link-button {
    display: block;
    padding: 18px 24px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUp 0.4s ease-out forwards;
    will-change: transform;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.link-button:nth-child(1) { animation-delay: 0.6s; }
.link-button:nth-child(2) { animation-delay: 0.7s; }
.link-button:nth-child(3) { animation-delay: 0.8s; }

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.link-button-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    font-size: 18px;
    padding: 22px 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.link-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 36px rgba(139, 92, 246, 0.5);
}

.link-button-primary:active {
    transform: translateY(0);
}

.link-button-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.link-button-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.link-button-secondary:active {
    transform: translateY(0);
}

/* Trust Copy */
.trust-copy {
    text-align: center;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.9s forwards;
}

.trust-line {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    font-weight: 400;
    line-height: 1.5;
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1;
    margin-top: auto;
}

.footer-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--text-secondary);
}

.footer-separator {
    color: var(--text-tertiary);
    margin: 0 8px;
    font-size: 11px;
}

/* Desktop Layout - Side by Side */
@media (min-width: 768px) {
    .main-card {
        max-width: 900px;
        flex-direction: row;
        border-radius: 32px;
        align-items: stretch;
    }
    
    .photo-section {
        width: 45%;
        border-radius: 32px 0 0 32px;
        flex-shrink: 0;
        position: relative;
        align-self: stretch;
        overflow: hidden;
        background: transparent;
    }
    
    .photo-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        display: block;
        border-radius: 32px 0 0 32px;
    }
    
    .photo-overlay {
        background: linear-gradient(to right, transparent 0%, rgba(15, 14, 20, 0.2) 80%, rgba(15, 14, 20, 0.4) 100%);
        width: 20%;
        height: 100%;
        left: auto;
        right: 0;
        top: 0;
        bottom: auto;
    }
    
    .content-section {
        width: 55%;
        padding: 40px 36px;
        border-radius: 0 32px 32px 0;
        border-top: none;
        border-left: 1px solid var(--glass-border);
        margin-top: 0;
        margin-left: -1px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        min-height: 600px;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 767px) {
    .main-card {
        max-width: 480px;
    }
    
    .content-section {
        padding: 32px 28px;
    }
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .container {
        padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
        min-height: 100vh;
        min-height: 100dvh;
        align-items: flex-start;
        padding-top: max(6px, env(safe-area-inset-top));
    }
    
    .main-card {
        max-width: 100%;
        border-radius: 18px;
        margin: 0;
        max-height: 100vh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
    }
    
    .photo-section {
        border-radius: 18px 18px 0 0;
        aspect-ratio: 5 / 6;
        max-height: 28vh;
        min-height: 180px;
        flex-shrink: 1;
    }
    
    .content-section {
        padding: 16px 14px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        border-radius: 0 0 18px 18px;
        min-height: auto;
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 28vh - 30px);
        max-height: calc(100dvh - 28vh - 30px);
    }
    
    .card-header {
        margin-bottom: 10px;
    }
    
    .name {
        font-size: 22px;
        line-height: 1.2;
        margin-bottom: 2px;
    }
    
    .handle {
        font-size: 11px;
        margin-bottom: 3px;
    }
    
    .bio {
        font-size: 10px;
    }
    
    .social-icons {
        margin-bottom: 10px;
        gap: 8px;
    }
    
    .social-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }
    
    .social-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .promo-section {
        margin-bottom: 10px;
    }
    
    .promo-badge {
        font-size: 9px;
        padding: 5px 12px;
        margin-bottom: 4px;
    }
    
    .promo-subtext {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .promo-urgency {
        font-size: 8px;
        margin-bottom: 2px;
    }
    
    .countdown {
        font-size: 9px;
    }
    
    .links {
        gap: 6px;
        margin-bottom: 8px;
    }
    
    .link-button {
        padding: 12px 14px;
        font-size: 13px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .link-button-primary {
        font-size: 14px;
        padding: 14px 14px;
        min-height: 48px;
    }
    
    .link-button-secondary {
        min-height: 44px;
    }
    
    .trust-copy {
        margin-bottom: 6px;
    }
    
    .trust-line {
        font-size: 9px;
        margin-bottom: 2px;
        line-height: 1.3;
    }
    
    .trust-line {
        font-size: 11px;
        margin-bottom: 4px;
        line-height: 1.4;
    }
    
    .footer {
        padding-top: 16px;
    }
    
    .footer-link {
        font-size: 10px;
    }
}

/* Small Mobile (iPhone SE, etc.) */
@media (max-width: 375px) {
    .content-section {
        padding: 20px 16px;
    }
    
    .name {
        font-size: 26px;
    }
    
    .link-button {
        padding: 16px 18px;
        font-size: 15px;
    }
    
    .link-button-primary {
        font-size: 16px;
        padding: 18px 18px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}
