:root {
    --primary: #7f5af0;
    --secondary: #2cb67d;
    --background: #16161a;
    --surface: #242629;
    --text: #fffffe;
    --paragraph: #94a1b2;
    --shadow: rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(127, 90, 240, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(44, 182, 125, 0.15) 0%, transparent 30%);
    transition: var(--transition);
}

.container {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 32px;
    border-radius: 20px;
    background-color: var(--surface);
    box-shadow: 0 10px 30px var(--shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    padding: 3px;
    transition: var(--transition);
    background-color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.name {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.bio {
    color: var(--paragraph);
    text-align: center;
    font-size: 16px;
    max-width: 400px;
    margin-bottom: 10px;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    z-index: 2;
}

.link-item {
    background-color: var(--background);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    cursor: pointer;
}

.link-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 8px 15px rgba(127, 90, 240, 0.2);
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.7s ease;
}

.link-item:hover::before {
    left: 100%;
}

.link-item i {
    font-size: 22px;
    color: var(--primary);
    width: 30px;
    text-align: center;
}

.link-item.instagram i {
    color: #d62976;
}

.link-item.instagram:hover {
    border-color: #d62976;
    box-shadow: 0 8px 15px rgba(214, 41, 118, 0.2);
}

.link-item.snapchat i {
    color: #F9BE08;
}

.link-item.snapchat:hover {
    border-color: #F9BE08;
    box-shadow: 0 8px 15px rgba(249, 190, 8, 0.2);
}

.link-item.facebook i {
    color: #1877F2;
}

.link-item.facebook:hover {
    border-color: #1877F2;
    box-shadow: 0 8px 15px rgba(24, 119, 242, 0.2);
}

.link-item.email i {
    color: #612faa;
}

.link-item.email:hover {
    border-color: #612faa;
    box-shadow: 0 8px 15px rgba(97, 47, 170, 0.2);
}

.link-item.youtube i {
    color: #FF0000;
}

.link-item.youtube:hover {
    border-color: #FF0000;
    box-shadow: 0 8px 15px rgba(255, 0, 0, 0.2);
}

.link-content {
    flex: 1;
}

.link-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.link-description {
    font-size: 12px;
    color: var(--paragraph);
}

.social-icons {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--background);
    color: var(--text);
    font-size: 16px;
    transition: var(--transition);
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px);
    background-color: var(--primary);
    box-shadow: 0 5px 15px rgba(127, 90, 240, 0.3);
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(50px);
    z-index: 1;
}

.shape-1 {
    top: -50px;
    left: -50px;
    width: 250px;
    height: 250px;
    background-color: var(--primary);
}

.shape-2 {
    bottom: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    background-color: var(--secondary);
}

.footer {
    color: var(--paragraph);
    font-size: 12px;
    text-align: center;
    margin-top: 16px;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .container {
        padding: 24px 16px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .name {
        font-size: 20px;
    }

    .link-item {
        padding: 12px;
    }
}

/* Theme Toggle Button */
#theme-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    /* Moved from right to left as requested */
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    z-index: 3;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--background);
    transition: var(--transition);
}

#theme-toggle:hover {
    transform: rotate(30deg);
    background-color: var(--primary);
}

/* Share Button */
#share-button {
    position: absolute;
    top: 20px;
    right: 20px;
    /* Positioned at the top right */
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    z-index: 3;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--background);
    transition: var(--transition);
}

#share-button:hover {
    transform: scale(1.1);
    background-color: var(--secondary);
}

/* Light Mode Improvements */
.light-mode {
    --primary: #6246ea;
    --secondary: #27ae60;
    --background: #f0f2f5;
    /* Lighter background */
    --surface: #ffffff;
    /* White surface for better contrast */
    --text: #2b2c34;
    /* Darker text */
    --paragraph: #5f6c7b;
    /* Adjusted paragraph text */
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Toast notification for share success */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 0;
    transition: all 0.3s ease;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}