/* ============================================
   XFOURTEEN LINKTREE - GOLDEN ROYAL EDITION
   WITH FULL SCREEN VIDEO BACKGROUND
   ============================================ */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* Root Variables */
:root {
    --royal-dark: #0f0a0a;
    --royal-darker: #080505;
    --royal-darkest: #030202;
    --gold-primary: #d4af37;
    --gold-dark: #b8860b;
    --gold-light: #f5e56b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--royal-darker);
    color: #f5e6d3;
    overflow-x: hidden;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   BACKGROUND VIDEO - FULL SCREEN
   ============================================ */

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.7) contrast(1.1);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(8, 5, 5, 0.75) 0%, rgba(15, 10, 10, 0.7) 50%, rgba(212, 175, 55, 0.15) 100%);
    z-index: 1;
    pointer-events: none;
    animation: overlayPulse 8s ease-in-out infinite;
}

.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 2;
    pointer-events: none;
}

@keyframes overlayPulse {
    0% { background: linear-gradient(135deg, rgba(8, 5, 5, 0.75) 0%, rgba(15, 10, 10, 0.7) 50%, rgba(212, 175, 55, 0.1) 100%); }
    50% { background: linear-gradient(135deg, rgba(8, 5, 5, 0.7) 0%, rgba(15, 10, 10, 0.65) 50%, rgba(212, 175, 55, 0.2) 100%); }
    100% { background: linear-gradient(135deg, rgba(8, 5, 5, 0.75) 0%, rgba(15, 10, 10, 0.7) 50%, rgba(212, 175, 55, 0.1) 100%); }
}

/* ============================================
   CANVAS
   ============================================ */
#goldDustCanvas, #particleCanvas, #mouseTrailCanvas {
    z-index: -1 !important;
}

main, #toast {
    position: relative;
    z-index: 10;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--royal-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-primary), var(--gold-dark));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.font-cormorant {
    font-family: 'Cormorant Garamond', serif;
}

.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes spin-slow {
    to { transform: rotate(360deg); }
}

@keyframes ping-slow {
    0% { transform: scale(1); opacity: 1; }
    75%, 100% { transform: scale(1.5); opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-spin-slow { animation: spin-slow 6s linear infinite; }
.animate-ping-slow { animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite; }
.animate-fade-in { animation: fade-in 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards; }

/* ============================================
   LOADING SCREEN
   ============================================ */
#loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(3, 2, 2, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1), backdrop-filter 0.4s ease;
}

#loader::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: -1;
}

#loader .text-center {
    position: relative;
    z-index: 2;
    backdrop-filter: blur(0px) !important;
}

#loader::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 0;
}

#loader.loaded {
    opacity: 0;
    backdrop-filter: blur(0px) !important;
    transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
}

#loader .bg-gold-900\/30 {
    background: rgba(212, 175, 55, 0.15) !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

#loader #loadingBar {
    background: linear-gradient(90deg, #ffea8a, #ffdd77, #ffd966, #ffdd77, #ffea8a) !important;
    box-shadow: 0 0 12px rgba(255, 234, 138, 0.8) !important;
    transition: width 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

#loader .text-gold-400\/60 {
    color: rgba(255, 234, 138, 0.85) !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5) !important;
    letter-spacing: 3px !important;
}

#loader h2 {
    text-shadow: 0 0 20px rgba(255, 234, 138, 0.5) !important;
}

/* ============================================
   PROFILE SECTION
   ============================================ */
.text-center.mb-8 { margin-bottom: 32px !important; }

.avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.avatar-inner img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.avatar-inner img:hover {
    transform: scale(1.03);
    border-color: #ffdd99;
    box-shadow: 0 0 35px rgba(255, 200, 100, 0.5);
}

@media (min-width: 768px) {
    .avatar-inner img { width: 112px; height: 112px; }
}

h1 { margin-bottom: 8px !important; }

h1 .text-transparent.bg-clip-text {
    background: linear-gradient(135deg, #ffdd99, #ffcc77, #ffdd99) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    text-shadow: 0 0 20px rgba(255, 200, 100, 0.5) !important;
    display: inline-block !important;
}

h1 .text-white {
    background: linear-gradient(135deg, #ffffff, #ffeedd, #ffffff) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
    display: inline-block !important;
}

@media (min-width: 768px) {
    h1 .text-transparent.bg-clip-text,
    h1 .text-white { font-size: 2.2rem !important; }
}

@media (max-width: 480px) {
    h1 .text-transparent.bg-clip-text,
    h1 .text-white { font-size: 1.4rem !important; }
}

.text-gold-300\/60 {
    color: rgba(230, 213, 184, 0.85) !important;
    font-size: 0.85rem !important;
    max-width: 280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    line-height: 1.5 !important;
}

@media (min-width: 768px) {
    .text-gold-300\/60 { font-size: 0.9rem !important; max-width: 320px !important; }
}

/* ============================================
   LINK CARDS
   ============================================ */
.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(145deg, #0f0a0a, #080505);
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(115deg, transparent 0%, transparent 40%, rgba(212, 175, 55, 0.08) 50%, rgba(255, 255, 255, 0.1) 60%, transparent 70%, transparent 100%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.link-card:hover::before {
    opacity: 1;
    animation: shimmer 1.2s ease-in-out infinite;
}

.link-card:hover {
    border-color: #ffdd99;
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.2);
}

.link-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.link-card h3 {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 3px;
    color: #fff2e6 !important;
}

.link-card p {
    font-size: 0.65rem;
    line-height: 1.3;
    color: rgba(230, 213, 184, 0.6) !important;
}

@media (min-width: 768px) {
    .link-card { padding: 16px 22px; gap: 16px; }
    .link-icon { width: 50px; height: 50px; border-radius: 16px; }
    .link-card h3 { font-size: 1rem; }
    .link-card p { font-size: 0.7rem; }
}

/* ============================================
   SOCIAL ICONS
   ============================================ */
.social-icons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 8px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.25s ease;
}

.social-icon i {
    font-size: 1.3rem !important;
    color: rgba(212, 175, 55, 0.6) !important;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.social-icon:hover i {
    color: #ffdd99 !important;
    transform: translateY(-2px) scale(1.1);
}

@media (min-width: 768px) {
    .social-icons { gap: 28px; }
    .social-icon i { font-size: 1.5rem !important; }
}

/* ============================================
   LINKS CONTAINER
   ============================================ */
.links-container {
    animation: fade-in 0.5s ease forwards;
    animation-delay: 0.15s;
    opacity: 0;
    animation-fill-mode: forwards;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    opacity: 0;
    visibility: hidden;
}

#toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

#toast .toast-content {
    background: linear-gradient(135deg, #ffdd77, #ffd966, #ffea8a);
    border-radius: 50px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 221, 119, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

#toast .toast-content i {
    font-size: 1.2rem;
    color: #1a1408;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

#toast .toast-content span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a1408;
    letter-spacing: 0.5px;
    font-family: 'Montserrat', sans-serif;
}

@media (max-width: 640px) {
    #toast .toast-content { padding: 10px 20px; gap: 10px; }
    #toast .toast-content i { font-size: 1rem; }
    #toast .toast-content span { font-size: 0.75rem; }
    #toast { bottom: 20px; }
}

@keyframes toast-icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#toast.show .toast-content i { animation: toast-icon-pulse 0.5s ease-in-out; }

/* ============================================
   FOOTER
   ============================================ */
footer p {
    color: rgba(212, 175, 55, 0.35) !important;
    font-size: 0.7rem !important;
}

@media (min-width: 768px) {
    footer p { font-size: 0.75rem !important; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .link-card { padding: 12px 16px; gap: 12px; }
    .link-icon { width: 40px; height: 40px; border-radius: 12px; }
    .link-card h3 { font-size: 0.85rem; }
    .link-card p { font-size: 0.6rem; }
    .social-icons { gap: 16px; }
    .social-icon i { font-size: 1.2rem !important; }
}

@media (max-width: 768px) {
    .video-overlay { background: linear-gradient(135deg, rgba(8, 5, 5, 0.85) 0%, rgba(15, 10, 10, 0.8) 50%, rgba(212, 175, 55, 0.2) 100%); }
}

/* ============================================
   PERFORMANCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
