/* ============================================
   Linktree Style - Mi Puerta Mayer
   Sistema de diseño adaptado
   ============================================ */

:root {
    /* Degradados Premium */
    --mayer-master-gradient: linear-gradient(to right, #75482A, #E09B3D, #F5E48B, #F5AC4D, #7E4B2A);
    --chrome-gradient: linear-gradient(135deg, #3d3d3d 0%, #6b6b6b 25%, #9a9a9a 50%, #6b6b6b 75%, #3d3d3d 100%);
    --chrome-red-gradient: linear-gradient(135deg, #8B0000 0%, #DC143C 25%, #FF6B6B 50%, #DC143C 75%, #8B0000 100%);

    /* Colores de estado */
    --color-success: #00c853;
    --color-warning: #ffab00;
    --color-danger: #ff1744;
    --color-info: #2196f3;

    /* Planes */
    --plan-silver: #C0C0C0;
    --plan-gold: #FFD700;
    --plan-black: #1a1a1a;

    /* Tipografía */
    --font-primary: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Consolas', 'Monaco', monospace;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;

    /* Espaciado */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Bordes */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

[data-theme="dark"],
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #252525;
    --bg-elevated: #2d2d2d;
    --bg-hover: #333333;
    --bg-active: #3d3d3d;

    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --text-inverse: #1a1a1a;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-strong: rgba(255, 255, 255, 0.15);

    --shadow-light: -4px -4px 8px rgba(255, 255, 255, 0.03);
    --shadow-dark: 4px 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-inset: inset 4px 4px 8px rgba(0, 0, 0, 0.4), inset -4px -4px 8px rgba(255, 255, 255, 0.03);

    --card-bg: var(--bg-secondary);
    --card-shadow: var(--shadow-dark), var(--shadow-light);
    --accent-primary: #E09B3D;
}

[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #e8e8e8;
    --bg-elevated: #ffffff;
    --bg-hover: #d9d9d9;
    --bg-active: #cccccc;

    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-inverse: #ffffff;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-strong: rgba(0, 0, 0, 0.15);

    --shadow-light: -4px -4px 8px rgba(255, 255, 255, 0.8);
    --shadow-dark: 4px 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-inset: inset 4px 4px 8px rgba(0, 0, 0, 0.08), inset -4px -4px 8px rgba(255, 255, 255, 0.8);

    --card-bg: var(--bg-elevated);
    --card-shadow: var(--shadow-dark), var(--shadow-light);
    --accent-primary: #75482A;
}

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

body {
    font-family: var(--font-primary);
    background: #1a1a1a;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-overlay svg {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.background-mask {
    position: absolute;
    inset: -30px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
    mask-image: url('mask.png');
    mask-size: cover;
    mask-repeat: no-repeat;
    mask-position: center;
    filter: url(#shadowTurbulence) blur(4px);
    animation: hueRotate 20s linear infinite;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url('noise.png');
    background-size: 200px;
    background-repeat: repeat;
    opacity: 0.08;
    pointer-events: none;
}

@keyframes hueRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.linktree-container {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.profile__logo {
    width: 170px;
    height: auto;
    margin: var(--space-xl) auto var(--space-sm);
    display: block;
}

.profile__logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.profile__name {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #ffffff;
    margin-top: 30px;
    margin-bottom: var(--space-xs);
}

.profile__logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.profile__username {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.profile__bio {
    font-size: var(--font-size-sm);
    color: #ccc;
    line-height: 1.6;
}

/* Links Section */
.links {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    flex: 1;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 6px var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: #fff;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: var(--mayer-master-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.link-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.link-card:hover::before {
    opacity: 1;
}

.link-card__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    color: #DC143C;
}

.link-card__icon i,
.link-card__arrow i,
.social-link i {
    font-size: 24px;
}

.link-card__arrow i {
    font-size: 20px;
}

.social-link i {
    font-size: 22px;
}

.link-card__content {
    flex: 1;
    min-width: 0;
}

.link-card__title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: #fff;
    margin-bottom: var(--space-xs);
}

.link-card__arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform var(--transition-fast);
}

.link-card:hover .link-card__arrow {
    transform: translateX(4px);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer__text {
    font-size: var(--font-size-xs);
    color: #ccc;
}

.footer__link {
    color: #fff;
    text-decoration: none;
}

.footer__link:hover {
    text-decoration: underline;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 480px) {
    .linktree-container {
        padding: var(--space-xl) var(--space-lg);
    }

    .profile {
        margin-bottom: var(--space-2xl);
    }

    .profile__name {
        font-size: var(--font-size-xl);
    }

    .social-links {
        gap: var(--space-lg);
        margin-bottom: var(--space-xl);
    }

    .link-card {
        padding: var(--space-lg);
    }

    .link-card__icon {
        width: 44px;
        height: 44px;
    }

    .links {
        gap: var(--space-lg);
    }
}
