@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
@import url('https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css');

:root {
    /* Default variables - can be overridden by theme classes */
    --bg-top: #0d5cde; /* Blue */
    --bg-bottom: #f8fafc;
    --text-main: #ffffff;
    --text-secondary: #e2e8f0;
    --text-bottom: #1e293b;
    --card-bg: #ffffff;
    --social-bg: #ffffff;
    --social-icon: #0d5cde;
    --social-shadow: rgba(0,0,0,0.05);
}

/* Theme: Dark */
.theme-dark {
    --bg-top: #1e293b;
    --bg-bottom: #0f172a;
    --text-main: #ffffff;
    --text-secondary: #94a3b8;
    --text-bottom: #f8fafc;
    --card-bg: #1e293b;
    --social-bg: #1e293b;
    --social-icon: #f8fafc;
    --social-shadow: rgba(0,0,0,0.5);
}

/* Theme: Forest */
.theme-forest {
    --bg-top: #166534;
    --bg-bottom: #f0fdf4;
    --text-main: #ffffff;
    --text-secondary: #dcfce7;
    --text-bottom: #14532d;
    --card-bg: #ffffff;
    --social-bg: #ffffff;
    --social-icon: #166534;
    --social-shadow: rgba(0,0,0,0.08);
}

/* Theme: Sunset */
.theme-sunset {
    --bg-top: linear-gradient(135deg, #f97316, #ec4899);
    --bg-bottom: #fff1f2;
    --text-main: #ffffff;
    --text-secondary: #ffe4e6;
    --text-bottom: #881337;
    --card-bg: #ffffff;
    --social-bg: #ffffff;
    --social-icon: #ec4899;
    --social-shadow: rgba(0,0,0,0.08);
}

/* Theme: Minimal */
.theme-minimal {
    --bg-top: #ffffff;
    --bg-bottom: #ffffff;
    --text-main: #000000;
    --text-secondary: #4b5563;
    --text-bottom: #000000;
    --card-bg: #f3f4f6;
    --social-bg: #f3f4f6;
    --social-icon: #000000;
    --social-shadow: transparent;
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-bottom);
    color: var(--text-bottom);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    direction: rtl;
}

.top-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 55%;
    background: var(--bg-top);
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    z-index: 0;
}

.theme-minimal .top-background {
    border: none;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.lang-switch {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    backdrop-filter: blur(5px);
}
.theme-minimal .lang-switch {
    background: #f3f4f6;
    border: none;
}

.logo-text {
    color: var(--text-main);
    font-size: 24px;
    font-weight: 700;
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 25px;
}

.profile-image-wrapper {
    position: relative;
    padding: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 35px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}
.theme-minimal .profile-image-wrapper {
    background: transparent;
    padding: 0;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    object-fit: cover;
    display: block;
}

.profile-name {
    color: var(--text-main);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    max-width: 90%;
}

.profile-location {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
    transform: translateY(15px); /* Overlapping effect */
}

.social-icon {
    width: 50px;
    height: 50px;
    background: var(--social-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--social-icon);
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 15px var(--social-shadow);
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
}

.links-container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 40px;
}

/* Check if just one link */
.links-container:has(> :last-child:nth-child(1)) {
    grid-template-columns: 1fr;
}


.link-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    min-height: 140px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-dark .link-card {
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.link-icon-wrapper {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 22px;
}

.link-subtitle {
    font-size: 13px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.link-title {
    font-size: 18px;
    font-weight: 700;
}

footer {
    margin-top: auto;
    padding: 20px;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}
