@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --font-base: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --color-bg: #060812;
    --color-panel: #0e162b;
    --color-surface: #0f1c38;
    --color-border: rgba(0, 234, 255, 0.18);
    --color-text: #e8f0ff;
    --color-muted: #9fb3c8;
    --color-accent: #00eaff;
    --color-accent-2: #7c4dff;
    --color-success: #3fe28f;
    --gradient-surface: linear-gradient(150deg, rgba(255,255,255,0.04), rgba(0,0,0,0.25)), radial-gradient(circle at 20% 20%, rgba(0,234,255,0.12), transparent 32%), radial-gradient(circle at 80% 0%, rgba(124,77,255,0.1), transparent 32%), #0a0f1f;
    --glass: rgba(255, 255, 255, 0.04);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
}

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

body {
    font-family: var(--font-base);
    background: var(--gradient-surface);
    min-height: 100vh;
    color: var(--color-text);
}

/* Navbar */
nav {
    background: linear-gradient(160deg, rgba(15, 28, 54, 0.92), rgba(7, 9, 16, 0.92));
    backdrop-filter: blur(14px);
    padding: 1rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid var(--color-border);
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 1px;
    text-transform: uppercase;
}

nav a {
    color: var(--color-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--color-accent);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Profile Header */
.profile-header {
    background: var(--glass);
    backdrop-filter: blur(12px);
    color: var(--color-text);
    padding: 3rem 2.2rem;
    text-align: center;
    margin: 2rem 0;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.profile-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(0, 234, 255, 0.14), transparent 35%);
    pointer-events: none;
}

.profile-avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 10px 25px rgba(0, 234, 255, 0.25));
}

.profile-name {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
    letter-spacing: -0.01em;
}

.profile-username {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    color: var(--color-muted);
}

.profile-bio {
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto;
    color: var(--color-text);
}

/* Links Section */
.links-section {
    padding: 2.5rem;
    position: relative;
}

.links-section::before,
.links-section::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    filter: blur(120px);
    opacity: 0.35;
    z-index: 0;
}

.links-section::before {
    background: #00eaff;
    top: -40px;
    left: 5%;
}

.links-section::after {
    background: #7c4dff;
    bottom: 0;
    right: 8%;
}

.section-title {
    font-size: 1.9rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.4rem;
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 1;
}

.link-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(0,0,0,0.25)), var(--glass);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.35s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.link-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(0, 234, 255, 0.08), transparent 35%);
    pointer-events: none;
}

.link-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 22px 52px rgba(0, 234, 255, 0.22);
    border-color: rgba(0, 234, 255, 0.35);
}

.link-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.link-title {
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.4rem;
}

.link-description {
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.link-url {
    color: var(--color-muted);
    font-size: 0.85rem;
    word-break: break-all;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.empty-state {
    background: var(--glass);
    backdrop-filter: blur(12px);
    color: var(--color-muted);
    padding: 4rem 2rem;
    border-radius: 14px;
    text-align: center;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-text {
    font-size: 1.2rem;
}

/* Footer */
footer {
    background: linear-gradient(160deg, rgba(15, 28, 54, 0.85), rgba(7, 9, 16, 0.9));
    color: var(--color-muted);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 1px solid var(--color-border);
}

footer a {
    color: var(--color-accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Error Page */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.error-box {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    backdrop-filter: blur(10px);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #00d4ff;
}

.error-message {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    color: #cbd5e0;
}

.btn-back {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #0f0f0f;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    nav .container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .profile-header {
        padding: 2rem 1rem;
        margin: 1rem;
        border-radius: 10px;
    }

    .profile-avatar {
        font-size: 3rem;
    }

    .profile-name {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .profile-username {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .profile-bio {
        font-size: 0.95rem;
    }

    .links-section {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .links-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .link-card {
        padding: 1.2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .error-container {
        padding: 1rem;
    }

    .error-box {
        padding: 2rem;
        max-width: 100%;
        margin: 1rem;
    }

    .error-icon {
        font-size: 2.5rem;
    }

    .error-title {
        font-size: 1.5rem;
    }

    .error-message {
        font-size: 1rem;
    }

    .btn-back {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.8rem;
    }

    nav .container {
        flex-direction: column;
        gap: 0.8rem;
    }

    .logo {
        font-size: 1rem;
    }

    .profile-header {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        border-radius: 8px;
    }

    .profile-avatar {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }

    .profile-name {
        font-size: 1.5rem;
        margin-bottom: 0.4rem;
    }

    .profile-username {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }

    .profile-bio {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .links-section {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    .links-grid {
        gap: 1rem;
    }

    .link-card {
        padding: 1rem;
        border-radius: 8px;
    }

    .link-url {
        font-size: 0.85rem;
        word-break: break-all;
    }

    .link-icon {
        font-size: 1.8rem;
    }

    .link-title {
        font-size: 1rem;
    }

    .link-description {
        font-size: 0.8rem;
    }

    .link-stats {
        font-size: 0.75rem;
    }

    .error-container {
        padding: 0.5rem;
    }

    .error-box {
        padding: 1.5rem;
        margin: 0.5rem;
        border-radius: 8px;
    }

    .error-icon {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .error-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .error-message {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .btn-back {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}
