/* Base Theme Variables - Variant 1: Deep Purple */
:root {
    --bg-primary: #0d0010;
    --bg-secondary: #1b001b;
    --bg-terminal: #2a0a2a;
    --text-primary: #e6e6fa;
    --text-accent: #4ade80;
    --border-color: #5d3fd3;
}

/* Theme Variant 2: Midnight Lavender */
.theme-lavender {
    --bg-primary: #120312;
    --bg-secondary: #240624;
    --bg-terminal: #3a0a3a;
    --text-primary: #d8bfd8;
    --text-accent: #7fffd4;
    --border-color: #8a2be2;
}

/* Theme Variant 3: Royal Plum */
.theme-royal {
    --bg-primary: #0a0015;
    --bg-secondary: #1a0025;
    --bg-terminal: #2a0035;
    --text-primary: #f0e6ff;
    --text-accent: #39ff14;
    --border-color: #9932cc;
}

/* Base Styles */
body {
    scrollbar-width: thin;
    scrollbar-color: #4a5568 #1a202c;
    background-color: var(--bg-primary) !important;
    color: var(--text-primary);
}

body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: #1a202c;
}

body::-webkit-scrollbar-thumb {
    background-color: #4a5568;
    border-radius: 4px;
}

.laptop {
    z-index: 40;
    bottom: -40% !important;
    right: -130% !important;
}

/* Bird Eye Follow Effect */
.bird-container {
    position: relative;
    width: 201px;
    height: 283px;
}

.bird-layers {
    position: relative;
    width: 100%;
    height: 100%;
}

.bird-bg,
.bird-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Use the bird image as a mask for the eyes */
.bird-eyes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* The eyes will only be visible through the transparent parts of bird.png */
    mask-image: url("../images/bird_bg.png");
    -webkit-mask-image: url("../images/bird_bg.png");
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
}

.eye {
    position: absolute;
    width: 15px;
    height: 15px;
    transition: transform 0.1s ease;
}

.left-eye {
    top: 30px;
    left: 85px;
}

.right-eye {
    top: 25px;
    left: 113px;
}

/* Modal Styles */
#donateModal.show {
    display: flex;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .bird-container {
        transform: scale(0.5);
    }

    .laptop {
    }

    .projects {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0.5rem;
    }

    .terminal {
        height: auto;
        min-height: 300px;
    }
}

/* Donate Modal Mobile Scaling */
@media (max-width: 768px) {
    #donateModal .bird-container {
        transform: scale(0.5);
        margin: 0 auto;
    }
}

/* Terminal Styles */
.terminal {
    border: 1px solid var(--border-color);
    background-color: var(--bg-terminal);
}

#terminalContent {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-accent);
}

.typed-cursor {
    color: var(--text-accent);
    opacity: 1;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Gallery Styles */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.project-gallery:empty {
    display: none;
}

.project-gallery img {
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-gallery img:hover {
    transform: scale(1.05);
}

.gallery-item.valid-image {
    display: block;
}

/* Gallery placeholder styles */
.gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 96px; /* Match the h-24 class (24 * 4px = 96px) */
    aspect-ratio: 16/9;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.375rem; /* rounded-md */
}

.gallery-placeholder img {
    cursor: default;
    opacity: 0.3;
    filter: invert(1);
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.gallery-placeholder img:hover {
    transform: none;
}

/* SimpleLightbox customizations */
.sl-overlay {
    background-color: rgba(0, 0, 0, 0.9);
}

.sl-wrapper .sl-close,
.sl-wrapper .sl-navigation button {
    color: #fff;
}

.sl-wrapper .sl-counter {
    color: #fff;
    font-size: 14px;
}

.sl-wrapper .sl-caption {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-family: "Plus Jakarta Sans", sans-serif;
    border-radius: 4px;
}

.sl-wrapper .sl-image img {
    border: 2px solid #4a5568;
    border-radius: 4px;
}

/* Add dark purple background for project cards */
.project-cards > div {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}
.social-icons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1); /* Makes it white */
    transition: filter 0.3s;
}

.twitter-icon:hover, .youtube-icon:hover {
    filter: brightness(0) invert(0.7); /* Makes it gray (70% white) on hover */
}

/* Base styles for all icons */
.icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1); /* Makes it white */
    transition: filter 0.3s;
}

/* Hover effect for all icons */
.icon:hover, .repo-link:hover .icon {
    filter: brightness(0) invert(0.7); /* Makes it gray (70% white) on hover */
}

/* Text styling for repo links */
.repo-link {
    color: rgb(209, 213, 219); /* text-gray-300 equivalent */
    transition: color 0.3s;
}

.repo-link:hover {
    color: rgb(156, 163, 175); /* slightly grayed text on hover, matching icon hover */
}

/* Social icons positioning */
.social-icons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

/* Donate Modal Responsive Styles */
#donateModal {
    overflow-y: auto;
    padding: 20px 0;
}

#donateModal > div {
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    position: relative;
    width: 90%;
    max-width: 28rem; /* Tailwind's max-w-md is 28rem */
}

@media (max-height: 700px) {
    #donateModal {
        align-items: flex-start;
        padding-top: 50px;
    }
    
    #donateModal > div {
        max-height: 85vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    #donateModal > div {
        width: 95%;
        padding: 1rem;
    }
}

/* Donate Modal Theme Styling */
#donateModal {
    background-color: rgba(36, 6, 36, 0.8); /* Matches theme-lavender's bg-secondary with opacity */
}

#donateModal > div {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}


#donateModal input {
    background-color: rgba(36, 6, 36, 0.9);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

#donateModal button {
    transition: all 0.3s ease;
}

#donateModal .bitcoin-copy-btn {
    background-color: #8a2be2; /* A vibrant purple that matches the theme */
    color: var(--text-primary);
}

#donateModal .bitcoin-copy-btn:hover {
    background-color: #6a1b9a;
}

#donateModal .ethereum-copy-btn {
    background-color: #4a148c; /* Deeper purple for variety */
    color: var(--text-primary);
}

#donateModal .ethereum-copy-btn:hover {
    background-color: #311b92;
}

#donateModal .patreon-btn {
    background-color: #f249104d; /* Patreon's brand color with transparency */
    color: var(--text-primary);
}

#donateModal .patreon-btn:hover {
    background-color: #f2491080;
}

/* Add this after the existing modal styles */
.copy-popover {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.copy-popover.show {
    transform: translateY(0);
    opacity: 1;
}

.copy-popover::before {
    content: "✓";
    margin-right: 8px;
    color: #4ade80;
}

