:root {
    --primary-bg: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --danger: #ef4444;
    --success: #22c55e;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-bg);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

/* Glassmorphism Container */
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    z-index: 10;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Section */
.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    margin-bottom: 1rem;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.profile-bio {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

/* Links */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-btn {
    display: flex;
    /* Changed to flex for icon alignment */
    align-items: center;
    justify-content: center;
    /* Center content */
    gap: 12px;
    /* Space between icon and text */
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-btn i {
    font-size: 1.2rem;
}

.link-btn img.icon-preview {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
}

.link-btn:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Icon Selector */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
    height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 10px;
}

.icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.icon-option:hover,
.icon-option.selected {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

/* Social Footer Icons */
.social-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all 0.3s;
    opacity: 0.8;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    /* subtle background */
}

.social-btn:hover {
    color: var(--accent);
    transform: translateY(-3px);
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-btn img.icon-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* Admin Elements */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    transition: focus 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.btn {
    cursor: pointer;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.link-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    text-align: left;
}

.link-info h4 {
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.link-info a {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: none;
}

.link-actions {
    display: flex;
    gap: 0.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.nav-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}