/* Basic Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #e9ecef;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 20px;
    padding-bottom: 20px;
}

.link-bio-container {
    background-color: #f8f9fa;
    width: 100%;
    max-width: 420px;
    min-height: calc(100vh - 40px);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ==================== HEADER ==================== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.app-header h1 {
    font-size: 1.1em;
    font-weight: 500;
    color: #212529;
}

.header-icon {
    font-size: 1.2em;
    color: #495057;
    text-decoration: none;
    cursor: pointer;
}

/* ==================== PROFILE SECTION ==================== */
.profile-section {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(180deg, #e7edf0 0%, #f8f9fa 70%);
}

.profile-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: #4a5a6a;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px auto;
    font-size: 2.5em;
    overflow: hidden;
}

.profile-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: opacity 0.3s ease;
}

.username {
    font-size: 1.4em;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
    transition: opacity 0.3s ease;
}

.description {
    font-size: 0.9em;
    color: #495057;
    margin-bottom: 3px;
    transition: opacity 0.3s ease;
    line-height: 1.4;
}

.phone-number {
    font-size: 0.9em;
    color: #343a40;
    font-weight: 400;
    transition: opacity 0.3s ease;
}

/* ==================== DYNAMIC ITEMS CONTAINER ==================== */
.dynamic-items-container {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

/* ==================== PROFILE ITEMS ==================== */
.profile-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.profile-item-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #333;
}

.expandible-item .profile-item-header:hover {
    background-color: #f8f9fa;
}

/* Novicio - Verde cuando está activo */
.expandible-item:nth-child(1).active .profile-item-header {
    background-color: #4CAF50;
    color: #fff;
}

.expandible-item:nth-child(1).active .profile-item-name {
    color: #fff;
}

/* David - Azul cuando está activo */
.expandible-item:nth-child(2).active .profile-item-header {
    background-color: #2196F3;
    color: #fff;
}

.expandible-item:nth-child(2).active .profile-item-name {
    color: #fff;
}

.profile-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 10px;
    background-color: #e9ecef;
}

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

.profile-item-name {
    font-size: 0.95em;
    font-weight: 500;
    color: #495057;
    transition: color 0.3s ease;
}

/* ==================== EXPANDABLE LINKS ==================== */
.expandable-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 9px 15px 12px 15px;
    max-height: 500px;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 1;
}

.expandable-links.collapsed {
    max-height: 0;
    padding: 0 15px;
    opacity: 0;
}

/* ==================== LINK ITEMS ==================== */
.link-item {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 12px 12px;
    border: 1.5px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    background-color: #fff;
}

/* Items estáticos tienen margen para separarlos */
.static-link-item {
    margin-bottom: 8px;
}

/* style for item main */
.link-itemp {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 12px 12px;
    border: 1.5px solid #dee2e6;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.link-itemp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    background-color: #fff;
}

.link-icon {
    font-size: 1.5em;
    width: 35px;
    text-align: center;
    margin-right: 12px;
    color: #495057;
    flex-shrink: 0;
}

/* Colored Social Media Icons */
.link-icon.whatsapp-icon i,
.link-icon.instagram-icon i,
.link-icon.facebook-icon i,
.link-icon.youtube-icon i,
.link-icon.tiktok-icon i,
.link-icon.linkedin-icon i,
.link-icon.email-icon i,
.link-icon.github-icon i,
.link-icon.twitter-icon i,
.link-icon.portfolio-icon i {
    color: #fff;
    border-radius: 50%;
    padding: 7px;
    font-size: 0.9em;
    width: 32px;
    height: 32px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.link-icon.whatsapp-icon i {
    background-color: #25D366;
}

.link-icon.instagram-icon i {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.link-icon.facebook-icon i {
    background-color: #0866ff;
}

.link-icon.youtube-icon i {
    background-color: #ff0033;
}

.link-icon.tiktok-icon i {
    background-color: #000000;
}

.link-icon.linkedin-icon i {
    background-color: #0077b5;
}

.link-icon.email-icon i {
    background-color: #EA4335;
}

.link-icon.github-icon i {
    background-color: #181717;
}

.link-icon.twitter-icon i {
    background-color: #1DA1F2;
}

.link-icon.portfolio-icon i {
    background: linear-gradient(135deg, #1339e1 0%, #1552cf 100%);
}

.link-icon.idpe-logo-icon {
    color: #4a5a6a;
    font-size: 1.5em;
}

.link-text {
    flex-grow: 1;
    font-size: 0.95em;
    font-weight: 500;
}

.link-options {
    font-size: 1.1em;
    color: #6c757d;
    margin-left: auto;
}

/* ==================== FULL ITEM ==================== */
/* Removido - Ya no se usa */

/* ==================== VIBRATION ANIMATION ==================== */
@keyframes vibrate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-1.5deg);
    }
    75% {
        transform: rotate(1.5deg);
    }
}

.vibrating {
    animation: vibrate 0.6s ease-in-out !important;
    animation-fill-mode: both !important;
}

/* ==================== SOCIAL LINKS FOOTER ==================== */
.social-links {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.social-links a {
    font-size: 1.6em;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #667eea;
    transform: scale(1.15);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    body {
        padding-top: 0;
        padding-bottom: 0;
        background-color: #f8f9fa;
    }
    
    .link-bio-container {
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }
    
    .profile-section {
        padding: 20px 15px;
    }
    
    .profile-logo {
        width: 80px;
        height: 80px;
        font-size: 2.2em;
    }
    
    .dynamic-items-container {
        padding: 12px;
        gap: 10px;
    }
    
    .profile-item-header {
        padding: 10px 12px;
    }
    
    .link-item {
        padding: 10px 10px;
    }

    .link-itemp {
        padding: 10px 10px;
    }
    
    .expandable-links {
        padding: 9px 12px 10px 12px;
        gap: 6px;
    }
    
    .social-links {
        padding: 15px 10px;
    }
}
