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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.profile-card-container {
    position: relative;
    width: 100%;
    max-width: 420px;
}

/* Close Button */
.close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.close-btn-header {
    display: none;
}

/* Main Card - Glassmorphism Effect */
.profile-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 30px;
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Gradient Overlay */
.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    pointer-events: none;
}

/* Header Section */
.card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.profile-picture-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
    display: block;
}

.profile-picture:hover {
    transform: scale(1.05);
}

.profile-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    z-index: -1;
    opacity: 0.5;
    filter: blur(10px);
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.add-btn {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.add-btn:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.6);
}

/* Username Section */
.username-section {
    flex: 1;
    position: relative;
    z-index: 2;
    min-width: 0;
}

.username-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.username {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.status-badge {
    background: rgba(168, 85, 247, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.5);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.online-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Statistics Section */
.statistics-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.stat {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: lowercase;
    font-weight: 500;
}

/* Bio Section */
.bio-section {
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.bio-text {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.bio-text strong {
    color: #fff;
}

/* Service Icons */
.services-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.service-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a855f7;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.service-icon:hover {
    background: rgba(168, 85, 247, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* Actions Section */
.actions-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: inherit;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.play-btn i {
    font-size: 14px;
}

.mention-btn {
    background: rgba(255, 255, 255, 0.08);
}

.add-action-btn {
    background: rgba(255, 255, 255, 0.08);
}

/* CTA Section */
.cta-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 60px;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: capitalize;
    font-family: inherit;
    color: #fff;
}

/* Follow Button */
.btn-follow {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-follow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.6);
}

.btn-follow:active {
    transform: translateY(0);
}

/* Followed state */
.btn-follow.is-following {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.85);
}

.btn-follow.is-following:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Message Button */
.btn-message {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-message:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* WhatsApp Button */
.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #20ba58 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    padding: 14px;
}

.btn-whatsapp:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

/* Toast feedback */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 20px);
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(15, 12, 41, 0.9);
    border: 1px solid rgba(168, 85, 247, 0.45);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 200;
    max-width: 90vw;
    text-align: center;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Card dismiss animation */
.profile-card.is-closing {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.profile-card.is-hidden {
    display: none;
}

/* Keyboard focus */
.close-btn:focus-visible,
.add-btn:focus-visible,
.btn:focus-visible,
.action-btn:focus-visible,
.service-icon:focus-visible {
    outline: 2px solid #ec4899;
    outline-offset: 3px;
}

/* Responsive */
@media (max-width: 480px) {
    body { padding: 12px; }

    .profile-card {
        padding: 22px;
        border-radius: 24px;
    }

    .profile-picture { width: 84px; height: 84px; }

    .username { font-size: 20px; }

    .card-header { gap: 14px; }

    .statistics-section { gap: 10px; }

    .stat { padding: 12px 6px; }

    .stat-number { font-size: 20px; }

    .actions-section { gap: 8px; }

    .action-btn { font-size: 11px; padding: 10px 6px; }

    .cta-section { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 52px; }

    .btn { font-size: 13px; padding: 12px 8px; white-space: nowrap; }

    .btn-message i { font-size: 12px; }

    .close-btn { top: 12px; right: 12px; }
}

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