/* ================================================== */
/* 1. Global Styles & Dark Theme Variables            */
/* ================================================== */
:root {
    --bg-gradient: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    --card-bg: rgba(25, 28, 31, 0.65);
    --card-border-color: rgba(255, 255, 255, 0.15);
    --link-bg: rgba(44, 48, 52, 0.7);
    --link-bg-hover: rgba(58, 62, 67, 0.8);
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-icon: #ced4da;
    --glow-color: rgba(255, 255, 255, 0.7);
    --skeleton-bg: rgba(255, 255, 255, 0.1);
    --font-family: 'Inter', sans-serif;
    --transition-speed: 0.3s;
    --border-radius-main: 24px;
    --border-radius-inner: 16px;
} 

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

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================== */
/* 2. Main Profile Container & Animation Setup        */
/* ================================================== */
.profile-container {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-main);
    border: 1px solid var(--card-border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    position: relative; /* For positioning popups */
}

/* ================================================== */
/* 3. Header & Profile Info                           */
/* ================================================== */
.top-nav {
    display: flex;
    justify-content: space-between; /* Space out the icons */
    align-items: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    width: 100%;
    position: relative;
}

.explore-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--link-bg);
    border-radius: 50%;
    border: 1px solid var(--card-border-color);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.explore-icon-wrapper:hover {
    background-color: var(--link-bg-hover);
    transform: scale(1.1);
}

.notification-wrapper {
    position: relative; /* Reset position */
}

.top-nav i {
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 5px; /* Add some padding for easier clicking */
}

.top-nav i:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

/* --- NEW: Notification Dot --- */
.notification-wrapper .notification-dot {
    position: absolute;
    top: 2px; /* Position it at the top-right of the bell */
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: #ff4d4d;
    border-radius: 50%;
    border: 1.5px solid var(--card-bg);
    display: block; /* Make it visible */
    transition: transform 0.3s ease;
}

.notification-wrapper:hover .notification-dot {
    transform: scale(1.1); /* Slight grow on hover */
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: -10px;
}

.profile-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    overflow: hidden;
    transition: background-color 0.3s ease, border 0.3s ease;
    animation: radarShape 2s infinite ease-in-out;
}

@keyframes radarShape {
    0%, 100% {
        border-radius: 50%;
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    }
    50% {
        border-radius: 45%; /* subtly squishes */
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
    }
}

.profile-logo:hover {
    background-color: rgba(255, 255, 255, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}



.profile-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.profile-subtitle, .profile-tagline {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.profile-tagline {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================================== */
/* 4. Social Icons & Link Groups                      */
/* ================================================== */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 5px 0;
    transition: opacity 0.4s ease-in-out;
}

.social-icons a {
    color: var(--text-icon);
    font-size: 1.5rem;
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.social-icons a:hover {
    color: var(--text-primary);
    transform: scale(1.15);
}

.links-section, .link-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    margin-bottom: 4px;
}

/* ================================================== */
/* 5. Link Card Styling                               */
/* ================================================== */
.link-card {
    position: relative; /* Needed for action menu positioning */
    display: flex;
    align-items: center;
    background: var(--link-bg);
    border: 1px solid var(--card-border-color);
    border-radius: var(--border-radius-inner);
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, background-color 0.3s, border-color 0.3s;
    overflow: hidden; /* For skeleton shimmer effect */
}

.link-card:hover {
    background: var(--link-bg-hover);
    transform: translateY(-2px) scale(1.02);
}

.link-icon-left {
    font-size: 1.2rem;
    width: 25px;
    margin-right: 16px;
    color: var(--text-icon);
}

.link-text {
    flex-grow: 1;
    text-align: left;
}

.link-icon-right {
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px; /* Easier to click */
    z-index: 5;
}

/* ================================================== */
/* 6. Footer                                          */
/* ================================================== */
.site-footer {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ================================================== */
/* 7. NEW: Action Menus & Popups                      */
/* ================================================== */

/* --- Menu for the Ellipsis Icon --- */
.link-actions-menu {
    position: absolute; /* Positioned relative to .profile-container */
    
    /* MODIFIED: Set a fixed horizontal position. JS will only handle the 'top'. */
    right: 24px; 
    
    background: rgba(35, 38, 41, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid var(--card-border-color);
    z-index: 1010;
    overflow: hidden;
    display: none; /* Hidden by default */
    flex-direction: column;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.link-actions-menu.show {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.link-actions-menu button {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 12px 18px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
    transition: background-color 0.2s ease;
}

.link-actions-menu button:hover {
    background-color: var(--link-bg-hover);
}

.link-actions-menu button i {
    width: 18px; /* Align icons */
}

/* --- Panel for Notification Bell Icon --- */
.notification-panel {
    position: absolute;
    top: 40px; /* Position below the nav icons */
    right: 0;
    width: clamp(250px, 80vw, 300px); /* Responsive width */
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: var(--border-radius-inner);
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    pointer-events: none;
    display: none; /* Controlled by JS */
}

.notification-panel.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.notification-panel h4 {
    margin-bottom: 10px;
    font-weight: 600;
}

.notification-panel p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ================================================== */
/* 8. NEW: Skeleton Loading States                    */
/* ================================================== */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.link-card.skeleton {
    pointer-events: none; /* Disable clicking while loading */
    position: relative;
    overflow: hidden;
}

.skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

.skeleton .link-icon-left,
.skeleton .link-text,
.skeleton .link-icon-right {
    background-color: var(--skeleton-bg);
    color: transparent;
    border-radius: 4px;
}

.skeleton .link-text {
    width: 70%; /* Give the text a defined width */
}

.skeleton .link-icon-left,
.skeleton .link-icon-right {
    background-color: transparent; /* Icons don't need a background block */
}

/* ================================================== */
/* 9. Modal & Animations                              */
/* ================================================== */

#explore-btn.explore-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Reduced gap */
    width: auto; /* Let the button fit its content */
    padding: 8px 16px; /* Reduced padding */
    background: transparent;
    border-radius: var(--border-radius-inner);
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    font-size: 1rem; /* Slightly smaller font */
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

#explore-btn.explore-button:hover {
    background-color: var(--text-primary);
    color: var(--card-bg);
    transform: scale(1.05); /* Adjusted hover effect */
}

/* (The rest of your animations like @keyframes modalFadeIn, .modal-overlay, etc. go here) */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-overlay {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius-inner);
    border: 1px solid var(--card-border-color);
    position: relative;
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: modalFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-title {
    font-size: 1.3rem;
    margin-bottom: 24px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px;
    background: var(--link-bg);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
}

.modal-btn:hover {
    background: var(--link-bg-hover);
    transform: translateY(-2px);
}

.modal-btn i {
    font-size: 1.3rem;
}

/* ================================================== */
/* 10. Desktop & Larger Screen Adjustments            */
/* ================================================== */
@media (min-width: 800px) {
    .profile-container {
        max-width: 750px; /* Wider container for desktop */
        padding: 40px;
    }

    .profile-logo {
        width: 110px;
        height: 110px;
    }

    .profile-title {
        font-size: 1.8rem;
    }

    .profile-subtitle {
        font-size: 1.1rem;
    }

    .links-section {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Create two columns */
        gap: 24px; /* Gap between columns */
        align-items: start;
    }

    .link-group {
        gap: 16px; /* Increase gap between links */
    }

    .link-card {
        padding: 16px 20px;
    }

    .modal-content {
        max-width: 500px;
    }
}