﻿/* ============================================
   Dr. Jibbit - Luxurious Black & Gold Theme
   Linktree-Style Profile Page
   ============================================ */

/* ============================================
   1. RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #0a0a0a;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(26,26,26,1) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 50%, rgba(26,26,26,1) 0%, transparent 70%);
    min-height: 100vh;
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    color: #D4AF37;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle dark marble-like texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        repeating-conic-gradient(
            rgba(212,175,55,0.02) 0% 25%,
            transparent 0% 50%
        ) 0 0 / 60px 60px,
        repeating-conic-gradient(
            rgba(212,175,55,0.015) 0% 25%,
            transparent 0% 50%
        ) 30px 30px / 60px 60px,
        radial-gradient(circle at 30% 40%, rgba(184,134,11,0.04) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(184,134,11,0.03) 0%, transparent 50%);
    opacity: 0.04;
    pointer-events: none;
}

/* ============================================
   2. CONTAINER
   ============================================ */
.container,
.admin-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: center;
}

.admin-container {
    text-align: left;
}

/* ============================================
   3. PROFILE SECTION
   ============================================ */
.profile {
    text-align: center;
    padding-top: 20px;
}

.avatar-wrapper {
    display: inline-block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #D4AF37;
    box-shadow: 0 0 20px rgba(212,175,55,0.4);
    overflow: hidden;
    margin-bottom: 20px;
}

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

.profile-name {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 700;
    font-size: 2rem;
    color: #D4AF37;
    text-shadow: 0 0 30px rgba(212,175,55,0.3);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 10px 0 5px;
}

.profile-handle {
    font-size: 0.95rem;
    color: #8B7332;
    margin-bottom: 15px;
}

.profile-bio {
    font-size: 1rem;
    color: #8B7332;
    font-style: italic;
    margin-top: 10px;
}

/* ============================================
   4. ORNAMENT DIVIDER
   ============================================ */
.ornament {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px auto;
    max-width: 250px;
}

.ornament-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

.ornament-diamond {
    color: #D4AF37;
    font-size: 0.6rem;
    text-shadow: 0 0 8px rgba(212,175,55,0.5);
}

/* ============================================
   5. LINK BUTTONS
   ============================================ */
.links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 25px;
}

.link-button {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(20,18,14,0.95), rgba(30,27,22,0.95));
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 12px;
    text-decoration: none;
    color: #D4AF37;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.link-button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #B8860B, #D4AF37, #B8860B);
    opacity: 0.6;
}

.link-button:hover {
    border-color: rgba(212,175,55,0.6);
    box-shadow: 0 0 20px rgba(212,175,55,0.15);
    transform: translateY(-2px) scale(1.01);
    background: linear-gradient(135deg, rgba(30,27,22,0.95), rgba(40,35,28,0.95));
}

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

.link-icon {
    min-width: 45px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-icon-img {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 4px rgba(212,175,55,0.3));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.link-button:hover .link-icon-img {
    filter: drop-shadow(0 0 8px rgba(212,175,55,0.6));
    transform: scale(1.1);
}

.link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.link-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #D4AF37;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.link-subtitle {
    font-size: 0.8rem;
    color: #8B7332;
    letter-spacing: 1px;
}

.link-arrow {
    font-size: 1.3rem;
    color: #8B7332;
    transition: transform 0.3s ease;
}

.link-button:hover .link-arrow {
    transform: translateX(4px);
    color: #D4AF37;
}

/* ============================================
   6. FOOTER
   ============================================ */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
}

.footer-text {
    font-size: 0.75rem;
    color: #5a4a2a;
    letter-spacing: 1px;
}

/* ============================================
   7. ADMIN HEADER
   ============================================ */
.admin-header {
    text-align: center;
    padding: 20px 0;
}

.admin-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #D4AF37;
    text-shadow: 0 0 20px rgba(212,175,55,0.3);
    letter-spacing: 2px;
}

.admin-subtitle {
    font-size: 0.9rem;
    color: #8B7332;
    margin-top: 5px;
}

/* ============================================
   8. ADMIN CARDS
   ============================================ */
.admin-card {
    background: linear-gradient(135deg, rgba(20,18,14,0.95), rgba(25,22,18,0.95));
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #D4AF37;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212,175,55,0.15);
}

.card-info {
    font-size: 0.85rem;
    color: #8B7332;
    margin-bottom: 15px;
}

/* ============================================
   9. FORM STYLES
   ============================================ */
.link-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 0.8rem;
    color: #8B7332;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(10,10,10,0.8);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 8px;
    color: #D4AF37;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #5a4a2a;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 10px rgba(212,175,55,0.15);
}

/* ============================================
   10. BUTTONS
   ============================================ */
.btn {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-add {
    background: linear-gradient(135deg, #B8860B, #D4AF37);
    color: #0a0a0a;
    width: 100%;
}

.btn-add:hover {
    box-shadow: 0 0 20px rgba(212,175,55,0.3);
    transform: translateY(-1px);
}

.btn-save {
    background: linear-gradient(135deg, #B8860B, #D4AF37);
    color: #0a0a0a;
}

.btn-save:hover {
    box-shadow: 0 0 20px rgba(212,175,55,0.3);
}

.btn-cancel {
    background: transparent;
    border: 1px solid rgba(212,175,55,0.3);
    color: #8B7332;
}

.btn-cancel:hover {
    border-color: #D4AF37;
    color: #D4AF37;
}

.btn-back {
    background: transparent;
    border: 1px solid rgba(212,175,55,0.3);
    color: #D4AF37;
    text-decoration: none;
    display: inline-block;
}

.btn-back:hover {
    border-color: #D4AF37;
    box-shadow: 0 0 15px rgba(212,175,55,0.15);
}

.btn-reset {
    background: transparent;
    border: 1px solid rgba(180,80,80,0.3);
    color: #b45050;
}

.btn-reset:hover {
    border-color: #b45050;
    box-shadow: 0 0 15px rgba(180,80,80,0.15);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}

/* ============================================
   11. ADMIN LINKS LIST
   ============================================ */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(15,13,10,0.8);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: grab;
}

.link-item:hover {
    border-color: rgba(212,175,55,0.35);
    background: rgba(25,22,18,0.9);
}

.link-item.dragging {
    opacity: 0.5;
    border-color: #D4AF37;
    transform: scale(0.98);
}

.link-item.hidden-link {
    opacity: 0.45;
}

.drag-handle {
    color: #8B7332;
    font-size: 1.2rem;
    cursor: grab;
    user-select: none;
    letter-spacing: 2px;
}

.link-item-icon {
    font-size: 1.4rem;
    min-width: 35px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-item-icon .link-icon-img {
    width: 24px;
    height: 24px;
}

.link-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.link-item-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #D4AF37;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.link-item-url {
    font-size: 0.75rem;
    color: #5a4a2a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-item-subtitle {
    font-size: 0.75rem;
    color: #8B7332;
}

.link-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.btn-icon:hover {
    background: rgba(212,175,55,0.1);
}

.btn-delete:hover {
    background: rgba(180,80,80,0.15);
}

/* ============================================
   11b. ICON UPLOAD
   ============================================ */
.icon-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-upload-wrapper input[type="file"] {
    flex: 1;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.85rem;
    color: #8B7332;
    padding: 8px 0;
    cursor: pointer;
}

.icon-upload-wrapper input[type="file"]::file-selector-button {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(20,18,14,0.95), rgba(30,27,22,0.95));
    border: 1px solid rgba(212,175,55,0.3);
    color: #D4AF37;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.icon-upload-wrapper input[type="file"]::file-selector-button:hover {
    border-color: #D4AF37;
    box-shadow: 0 0 12px rgba(212,175,55,0.2);
}

.icon-upload-preview {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 8px;
    border: 1px solid rgba(212,175,55,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10,10,10,0.8);
    overflow: hidden;
}

.icon-upload-preview .link-icon-img {
    width: 28px;
    height: 28px;
}

/* ============================================
   12. EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    color: #8B7332;
    font-style: italic;
    padding: 30px;
    font-size: 0.95rem;
}

/* ============================================
   13. MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: linear-gradient(135deg, #14120e, #1a1712);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalIn 0.3s ease;
}

.modal-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #D4AF37;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* ============================================
   14. TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #1a1712, #14120e);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 10px;
    padding: 14px 24px;
    color: #D4AF37;
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 0.85rem;
    letter-spacing: 1px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.warning {
    border-color: rgba(180,80,80,0.5);
    color: #b45050;
}

/* ============================================
   15. ADMIN FOOTER
   ============================================ */
.admin-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-bottom: 30px;
}

/* ============================================
   16. ANIMATIONS
   ============================================ */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(212,175,55,0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(212,175,55,0.35);
    }
}

/* ============================================
   17. RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .container,
    .admin-container {
        padding: 20px 16px;
    }

    .profile-name {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }

    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }

    .link-button {
        padding: 14px 16px;
    }

    .link-title {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }

    .link-icon {
        min-width: 40px;
    }

    .link-icon-img {
        width: 24px;
        height: 24px;
    }

    .form-row {
        flex-direction: column;
        gap: 14px;
    }

    .form-row .form-group {
        flex: 1;
        width: 100%;
    }

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

    .admin-card {
        padding: 18px;
    }

    .modal {
        padding: 24px 20px;
    }

    .link-item {
        padding: 12px 14px;
    }

    .link-item-actions {
        gap: 4px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.8rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn {
        width: 100%;
        text-align: center;
    }

    .admin-footer {
        gap: 10px;
    }
}

/* ============================================
   18. SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E8D48B;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #D4AF37 #0a0a0a;
}

/* ============================================
   19. SELECTION
   ============================================ */
::selection {
    background: rgba(212,175,55,0.3);
    color: #D4AF37;
}

::-moz-selection {
    background: rgba(212,175,55,0.3);
    color: #D4AF37;
}
