:root {
    --peach: #fed7aa;
    --rose: #fbcfe8;
    --cream: #fef3c7;
    --ink: #18181b;
    --white-alpha: rgba(255, 255, 255, 0.6);
    --white-solid: #ffffff;
    
    --font-main: 'Outfit', sans-serif;
    --font-script: 'Caveat', cursive;
}

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

body {
    background-color: var(--cream);
    background-image: radial-gradient(circle at 50% 0%, rgba(254, 215, 170, 0.4) 0%, transparent 70%);
    color: var(--ink);
    font-family: var(--font-main);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* Container */
.tree-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Profile Section */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
}

.avatar-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--peach), var(--rose));
    padding: 4px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(251, 207, 232, 0.6);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--cream);
    background-color: var(--white-solid);
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.bio-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(24, 24, 27, 0.7);
    margin-bottom: 4px;
}

.bio-script {
    font-family: var(--font-script);
    font-size: 1.5rem;
    color: #e11d48; /* a deeper rose/red for accent */
    transform: rotate(-2deg);
    margin-top: 8px;
}

/* Socials */
.socials {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    color: var(--ink);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(251, 207, 232, 0.5);
}

.social-link:hover, .social-link:active {
    background: var(--white-solid);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 207, 232, 0.4);
    color: #e11d48;
}

/* Links */
.links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
}

.link-card {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(253,242,248,0.9) 100%);
    border: 1px solid rgba(251, 207, 232, 0.8);
    border-radius: 24px;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(254, 215, 170, 0.2);
}

.link-card:hover, .link-card:active {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 25px rgba(251, 207, 232, 0.5);
    border-color: var(--rose);
}

.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cream);
    color: #e11d48;
    margin-right: 16px;
    flex-shrink: 0;
}

.link-title {
    flex-grow: 1;
    font-weight: 600;
    font-size: 1rem;
}

.link-chevron {
    color: rgba(24, 24, 27, 0.3);
    transition: transform 0.3s ease;
}

.link-card:hover .link-chevron {
    transform: translateX(3px);
    color: #e11d48;
}

.link-card.subscribed {
    background: linear-gradient(135deg, rgba(240,253,244,0.9) 0%, rgba(220,252,231,0.9) 100%);
    border-color: #86efac;
}
.link-card.subscribed .link-icon { color: #16a34a; }

/* Powered By */
#wbx-powered-by-slot {
    margin-top: auto;
    width: 100%;
    padding-top: 24px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(24, 24, 27, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--white-solid);
    border-radius: 32px;
    padding: 40px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 101;
    text-align: center;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(24, 24, 27, 0.4);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--cream);
    color: var(--ink);
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.modal-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.modal-header p {
    color: rgba(24, 24, 27, 0.6);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--cream);
    border-radius: 16px;
    font-family: var(--font-main);
    font-size: 1rem;
    background: #fffdf5;
    transition: border-color 0.3s;
    outline: none;
}

input[type="email"]:focus {
    border-color: var(--peach);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--ink);
    color: var(--white-solid);
    border: none;
    border-radius: 16px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #3f3f46;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(24, 24, 27, 0.2);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.error-msg {
    color: #e11d48;
    font-size: 0.85rem;
    margin-top: 12px;
    font-weight: 500;
}