/* Modern Reset & Base Styles */
:root {
    --primary: #6c5ce7;
    --primary-dark: #5649c0;
    --secondary: #00cec9;
    --accent: #ffb142;
    --dark: #1e272e;
    --darker: #0f1721;
    --light: #f5f6fa;
    --gray: #a4b0be;
    --success: #2ecc71;
    --danger: #e74c3c;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 18px 45px rgba(0,0,0,0.35);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Light mode variables */
.light-mode {
    --bg-color: #f1f3f8;
    --text-color: #1e272e;
    --container-bg: rgba(255, 255, 255, 0.96);
    --link-bg: rgba(108, 92, 231, 0.04);
    --link-hover-bg: rgba(108, 92, 231, 0.1);
    --border-color: rgba(0, 0, 0, 0.06);
    --gray: #636e72;
}

/* Dark mode variables */
.dark-mode {
    --bg-color: #050816;
    --text-color: #f5f6fa;
    --container-bg: rgba(15, 23, 42, 0.95);
    --link-bg: rgba(148, 163, 184, 0.05);
    --link-hover-bg: rgba(108, 92, 231, 0.2);
    --border-color: rgba(148, 163, 184, 0.25);
    --gray: #a4b0be;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at top, #312e81 0, #020617 45%, #000 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Wrapper to center card */
.page-wrapper {
    min-height: 100vh;
    padding: 2.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container */
.container {
    background: var(--container-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 26px;
    padding: 2.5rem 2.75rem;
    width: 100%;
    max-width: 680px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: var(--transition);
}

/* Soft gradient glow */
.container::before {
    content: '';
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.28), transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.2), transparent 60%),
        radial-gradient(circle at 0% 100%, rgba(236, 72, 153, 0.18), transparent 55%);
    opacity: 0.9;
    z-index: -2;
}

/* Glass overlay */
.container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(15,23,42,0.1));
    mix-blend-mode: soft-light;
    z-index: -1;
}

/* Hover lift */
@media (hover: hover) {
    .container:hover {
        transform: translateY(-4px);
        box-shadow: 0 24px 60px rgba(15,23,42,0.65);
    }
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 20;
}

#theme-toggle-button {
    background: radial-gradient(circle at 0 0, #facc15, #f97316);
    color: #0f172a;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.45);
    font-weight: 600;
}

#theme-toggle-button i {
    font-size: 1rem;
}

#theme-toggle-button span {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

#theme-toggle-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(251, 191, 36, 0.55);
}

#theme-toggle-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 15px rgba(251, 191, 36, 0.4);
}

/* Profile Section */
.profile-section {
    margin-bottom: 2.25rem;
    text-align: center;
}

.profile-pic-container {
    position: relative;
    width: 138px;
    height: 138px;
    margin: 0 auto 1.4rem;
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    box-shadow: 0 15px 35px rgba(15,23,42,0.7);
}

.profile-pic-border {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(
        from 180deg,
        #22d3ee,
        #6366f1,
        #ec4899,
        #22d3ee
    );
    z-index: 1;
    animation: rotate-border 6s linear infinite;
    filter: blur(0.3px);
}

@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-section h1 {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    background: linear-gradient(120deg, #e5e7eb, #a5b4fc, #6ee7b7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.03em;
}

.profile-section .title {
    font-size: 0.95rem;
    color: var(--gray);
    font-weight: 400;
    margin-bottom: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.profile-section .bio {
    font-size: 0.98rem;
    color: var(--gray);
    max-width: 80%;
    margin: 0 auto;
}

/* Donation Section */
.donation-section {
    margin-bottom: 2.25rem;
    text-align: center;
}

.donation-section h2 {
    font-size: 1.35rem;
    margin-bottom: 1.3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.donation-option {
    background: var(--link-bg);
    border-radius: 16px;
    padding: 1.35rem 1.3rem 1.4rem;
    margin-bottom: 1.4rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.donation-option::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 0 0, rgba(56,189,248,0.16), transparent 65%);
    opacity: 0.75;
    pointer-events: none;
}

.donation-option h3 {
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--gray);
}

.qris-image {
    width: 190px;
    height: 190px;
    border-radius: 18px;
    object-fit: contain;
    margin-bottom: 0.95rem;
    background: white;
    padding: 14px;
    border: 1px solid rgba(148,163,184,0.4);
    box-shadow: 0 16px 40px rgba(15,23,42,0.55);
}

.donation-text {
    font-size: 0.9rem;
    color: var(--gray);
}

.donation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.donation-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.3rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    gap: 0.65rem;
    min-width: 145px;
    max-width: 220px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.donation-button span {
    white-space: nowrap;
}

/* Tako Button */
.tako-button {
    background: rgba(129, 140, 248, 0.16);
    color: var(--text-color);
}

.tako-button:hover {
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    transform: translateY(-3px);
    color: white;
}

/* Saweria Button */
.saweria-button {
    background: rgba(248, 113, 113, 0.16);
    color: var(--text-color);
}

.saweria-button:hover {
    background: linear-gradient(135deg, #fb7185, #f97316);
    transform: translateY(-3px);
    color: white;
}

.donation-logo {
    height: 22px;
    width: auto;
}

/* Links Section */
.links-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.section-heading {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 500;
}

.link-button {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    background: var(--link-bg);
    color: var(--text-color);
    padding: 0.85rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    position: relative;
    overflow: hidden;
}

.link-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 0 0, rgba(148,163,184,0.3), transparent 60%);
    margin-right: 0.75rem;
}

.link-icon i {
    font-size: 1.2rem;
}

.link-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.link-title {
    font-weight: 600;
}

.link-subtitle {
    font-size: 0.78rem;
    color: var(--gray);
}

.link-arrow {
    font-size: 0.9rem;
    margin-left: 0.5rem;
    opacity: 0.65;
}

/* Brand hover colors */
.link-button:nth-of-type(2) .link-icon { /* WhatsApp */
    color: #25D366;
}
.link-button:nth-of-type(3) .link-icon { /* YouTube */
    color: #FF0000;
}
.link-button:nth-of-type(4) .link-icon { /* Instagram */
    color: #E1306C;
}
.link-button:nth-of-type(5) .link-icon,
.link-button:nth-of-type(6) .link-icon { /* TikTok */
    color: #25F4EE;
}
.link-button:nth-of-type(7) .link-icon { /* GitHub */
    color: #ffffff;
}
.link-button:nth-of-type(8) .link-icon { /* Email */
    color: #EA4335;
}

/* Hover state */
.link-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0 0, rgba(129,140,248,0.14), transparent 60%);
    opacity: 0;
    transition: var(--transition);
}

.link-button:hover::before {
    opacity: 1;
}

.link-button:hover {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 15px 35px rgba(15,23,42,0.45);
}

.link-button:hover .link-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* Ripple Effect */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.7s linear;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    mix-blend-mode: screen;
}

@keyframes ripple {
    to {
        transform: scale(3.2);
        opacity: 0;
    }
}

/* Footer */
.footer {
    text-align: center;
    color: var(--gray);
    font-size: 0.8rem;
    margin-top: 1.7rem;
    position: relative;
}

.footer span {
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 1.85rem 1.15rem;
    }

    .container {
        padding: 1.85rem 1.55rem 1.7rem;
        border-radius: 22px;
    }

    .theme-toggle {
        top: 1.1rem;
        right: 1.1rem;
    }

    .profile-pic-container {
        width: 120px;
        height: 120px;
    }

    .profile-section h1 {
        font-size: 1.9rem;
    }

    .profile-section .bio {
        max-width: 100%;
        font-size: 0.94rem;
    }

    .links-section {
        gap: 0.7rem;
    }

    .link-button {
        grid-template-columns: auto 1fr auto;
        padding: 0.9rem 0.9rem;
    }

    #theme-toggle-button span {
        display: none;
    }

    #theme-toggle-button {
        padding: 0.55rem;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.6rem 1.25rem 1.5rem;
    }

    .donation-buttons {
        flex-direction: column;
    }

    .donation-button {
        width: 100%;
        max-width: none;
    }
}
