:root {
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --card-bg: #ffffff;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #111827;
        --text-color: #f3f4f6;
        --card-bg: #1f2937;
        --primary-color: #60a5fa;
        --primary-hover: #3b82f6;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Animated Gradient Background */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 30s ease infinite;

    color: var(--text-color);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    line-height: 1.5;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Dark mode override for background if preferred, or keep gradient */
@media (prefers-color-scheme: dark) {
    body {
        /* Darker gradient for dark mode */
        background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #1f4068);
        background-size: 400% 400%;
    }
}

.container {
    width: 100%;
    max-width: 420px;
    text-align: center;
    /* Glassmorphism for container to make text readable on gradient */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (prefers-color-scheme: dark) {
    .container {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* Profile Section */
.profile {
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-out;
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color);
    border: 3px solid var(--card-bg);
}

.name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.bio {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Links Section */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed);
    box-shadow: 0 1px 3px 0 var(--shadow-color);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.5s ease-out backwards;
}

/* Stagger animation for buttons handled in JS or using nth-child */
.link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    background-color: var(--card-bg);
    /* Or slightly different shade */
    border-color: var(--primary-color);
}

.link-btn i {
    position: absolute;
    left: 1.5rem;
    font-size: 1.25rem;
}

/* Modal */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background-color: var(--card-bg);
    margin: 1rem;
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 15px -3px var(--shadow-color);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-title {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Form */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    /* Gray-300 */
    background-color: #ffffff;
    /* Always white background for inputs */
    color: #1f2937;
    /* Always dark text for inputs */
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
    /* Ensure font matches */
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: var(--primary-hover);
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}