/* CSS Theme: Luxurious Gold & Dark Mode */

:root {
    --bg-color: #0b0f19; /* Deep dark blue/black */
    --card-bg: rgba(20, 25, 40, 0.6);
    --card-border: rgba(212, 175, 55, 0.3);
    
    --gold-primary: #D4AF37; /* Classic Gold */
    --gold-light: #FFDF00;
    --gold-dark: #B8860B;
    --gold-gradient: linear-gradient(135deg, #FFDF00, #D4AF37, #B8860B);
    
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 223, 0, 0.03), transparent 25%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Sparkle Animations */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--gold-light);
    box-shadow: 0 0 10px 2px var(--gold-primary);
    animation: twinkle 3s infinite ease-in-out;
    opacity: 0;
}

.s1 { top: 10%; left: 15%; animation-delay: 0s; }
.s2 { top: 60%; right: 10%; animation-delay: 1.5s; width: 3px; height: 3px; }
.s3 { bottom: 15%; left: 20%; animation-delay: 0.7s; }
.s4 { top: 30%; right: 20%; animation-delay: 2.1s; }
.s5 { top: 80%; left: 30%; animation-delay: 0.4s; width: 5px; height: 5px; }
.s6 { bottom: 40%; right: 30%; animation-delay: 1.8s; }
.s7 { top: 40%; left: 10%; animation-delay: 0.9s; width: 3px; height: 3px; }
.s8 { bottom: 25%; right: 15%; animation-delay: 2.5s; }
.s9 { top: 15%; right: 40%; animation-delay: 1.2s; }
.s10 { top: 50%; left: 40%; animation-delay: 0.3s; width: 2px; height: 2px; }
.s11 { top: 70%; right: 45%; animation-delay: 2.7s; }
.s12 { top: 5%; left: 50%; animation-delay: 1.1s; }
.s13 { bottom: 5%; left: 50%; animation-delay: 0.6s; width: 5px; height: 5px; }
.s14 { top: 25%; right: 5%; animation-delay: 1.9s; }
.s15 { bottom: 10%; right: 40%; animation-delay: 2.2s; width: 3px; height: 3px; }

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.5); }
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 10;
}

/* Glassmorphism Card */
.glassmorphism {
    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 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37), inset 0 0 0 1px rgba(212, 175, 55, 0.1);
}

.relative {
    position: relative;
}

/* Edit Button */
.edit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-primary);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.edit-btn:hover {
    background: var(--gold-primary);
    color: #0b0f19;
    transform: rotate(15deg) scale(1.1);
}

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

.logo-circle {
    width: 90px;
    height: 90px;
    margin: 0 auto 1rem auto;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-color), var(--bg-color)), var(--gold-gradient);
    background-origin: border-box;
    background-clip: content-box, border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.logo-circle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.2);
    pointer-events: none;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.profile-tagline {
    font-size: 0.9rem;
    color: var(--gold-primary);
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Links Section */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-item:hover {
    background: rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 223, 0, 0.1), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.link-item:hover::before {
    left: 150%;
}

.link-icon {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    margin-right: 1rem;
    color: var(--gold-primary);
    font-size: 1.2rem;
    transition: 0.3s;
}

.link-item:hover .link-icon {
    background: var(--gold-gradient);
    color: #0b0f19;
}

.link-content {
    flex-grow: 1;
}

.link-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.link-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.link-arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: 0.3s;
}

.link-item:hover .link-arrow {
    color: var(--gold-primary);
    transform: translateX(3px);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

.gold-shine {
    font-weight: 700;
    background: linear-gradient(
        90deg, 
        #B8860B 0%, 
        #FFDF00 50%, 
        #B8860B 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}


/* --- Admin Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: 0.3s;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

/* Scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 4px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 1rem;
}

.modal-header h2 {
    color: var(--gold-primary);
    font-size: 1.5rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}
.close-btn:hover {
    color: #ef4444;
}

.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gold-primary);
    font-weight: 600;
}

.gold-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: 0.3s;
    outline: none;
    margin-bottom: 0.5rem;
}
.gold-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Drag and Drop Zone */
.drop-zone {
    border: 2px dashed rgba(212, 175, 55, 0.5);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: 0.3s;
}
.drop-zone:hover, .drop-zone.drag-over {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-primary);
}
.drop-zone i {
    font-size: 2.5rem;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
}

.file-preview {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Link Editor Items */
.link-edit-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.link-edit-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.remove-link-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
}
.add-link-btn {
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    border: 1px dashed var(--gold-primary);
    color: var(--gold-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}
.add-link-btn:hover {
    background: rgba(212, 175, 55, 0.1);
}

.save-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gold-gradient);
    border: none;
    border-radius: 8px;
    color: #0b0f19;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 1rem;
}
.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}
.save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
