:root {
  --bg: #121212;
  --panel: #1e1e1e;
  --muted: #888;
  --text: #e0e0e0;
  --accent: #f71900;
  --radius: 12px;
  --container-width: 1000px;
  --gap: 20px;
}

body {
    font-family: 'Fira Code', monospace;
    background-color: var(--bg);
    color: var(--text);
    margin: 40px;
}
body.light-mode {
    background-color: #e0e0e0;
    color: #121212;
}
a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
hr {
    border: 0;
    height: 1px;
    background: #333;
    margin: 20px 0;
}
.title {
    font-size: 24px;
    margin-bottom: 10px;
}
.heading {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
}
#theme-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    cursor: pointer;
    padding: 0;
}
#theme-toggle:hover {
    text-decoration: underline;
}
img{
    max-width: 100%;
    height: auto;
}
.text-bite-title {
    font-weight: bold;
    font-size: 18px;
}
.text-bite-date {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
}
.text-bite-content {
    margin-bottom: 20px;
}
.blog {
    display: flex;
    flex-direction: column;
    gap: 0px;
    font-size: 20px;
}
img {
    max-width: 100%;
    height: auto;
}
.alt {
    font-size: 14px;
    color: var(--muted);
    text-align: left;
}
.center {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 24px;
}
.profile-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--panel);
    padding: 22px;
    border-radius: var(--radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card ul {
    padding-left: 20px;
    list-style: none;
}

.card ul li {
    margin-bottom: 10px;
}

body.light-mode .card {
    background-color: #f0f0f0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.light-mode .card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #1e1e1e;
    border-radius: 8px;
}

body.light-mode nav {
    background-color: #f0f0f0;
}

nav a {
    font-weight: 600;
}

.socials-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.socials-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}
.socials-list a:hover {
    background: rgba(247,25,0,0.08);
    color: white;
}
.socials-list a.bluesky:hover { background: #0ea5e9; color: white; }
.socials-list a.medium:hover { background: black; color: #fff; }
.socials-list a.github:hover { background: black; color: #fff; }
.socials-list a.insta:hover { background: rgb(251, 82, 242); color: #fff; }
.socials-list a.email:hover { background: #ff6b6b; color: #fff; }
.socials-list a.discord:hover { background: #5865f2; color: #fff; }
.socials-list a.leaf:hover { background: #FFE577; color: #659736; }


.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.photo-gallery img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; display:block; }

#generateForm {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

#generateForm input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    background: #2a2a2a;
    color: #e0e0e0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

body.light-mode #generateForm input {
    background: #ffffff;
    color: #121212;
    border: 1px solid #ddd;
}

#generateForm input:focus {
    outline: 2px solid #f71900;
    outline-offset: -2px;
}

#generateForm button,
.btn {
    background: var(--accent);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#generateForm button:hover,
.btn:hover {
    background: #d41600;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    text-decoration: none;
}

#loading {
    text-align: center;
    color: #f71900;
    margin: 20px 0;
    font-size: 14px;
}

#result {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#result img {
    max-width: 640px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

body.light-mode #result img {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.flex {
    display: flex;
}

.gap-2 {
    gap: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.justify-center {
    justify-content: center;
}

nav a.active {
    color: #f71900;
    font-weight: 600;
}

.button-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* Loading */
#loading { display: none; }
.loading-visible { display: block !important; }

/* CDN uploader */
#cdn-uploader { display:flex; flex-direction:column; gap:10px; }
#cdn-select-btn, #cdn-upload-btn { padding: 10px 12px; border-radius: 8px; }
#cdn-file-name { color: var(--muted); font-size: 14px; }

.hero-banner { margin-bottom: 18px; border-radius: 12px; overflow: hidden; }
.hero-banner img { width: 100%; height: auto; display: block; object-fit: cover; }

@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; }
  #result img { max-width: 100%; }
  .hero-banner { max-height: 220px; }
}

@media (max-width: 600px) {
    body {
        margin: 20px;
    }

    .profile-container {
        flex-direction: column;
        text-align: center;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .center {
        padding: 10px;
    }

    #generateForm {
        flex-direction: column;
    }

    #generateForm button,
    .btn {
        width: 100%;
        justify-content: center;
    }

    #result .flex {
        flex-direction: column;
        width: 100%;
    }
}

/* --- Bluesky Feed Styles --- */
#bluesky-posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
#bluesky-loading {
    color: var(--muted);
    font-size: 14px;
}

/* Base post styling (with bottom separator) */
.bsky-post {
    padding-bottom: 1.25rem;
    padding: 0;
}
.bsky-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Post with an embed (Quote/Record) - Give it a distinct box */
.bsky-post-with-embed {
    padding: 1rem;
    border: 1px solid #444;
    border-radius: var(--radius);
    background-color: #242424; /* Slightly lighter background for the main post box */
    margin-bottom: 1.25rem; /* Replace the bottom border spacing */
}
.bsky-post-with-embed:last-child {
    margin-bottom: 0;
}
.bsky-post-with-embed + .bsky-post:not(.bsky-post-with-embed) {
    margin-top: 1.25rem;
}

.bsky-author {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.bsky-avatar {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 2px solid #444;
    flex-shrink: 0;
}
.bsky-author-info {
    flex: 1;
    min-width: 0;
}
.bsky-display-name {
    font-weight: bold;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}
.bsky-handle {
    color: var(--muted);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}
.bsky-date {
    font-size: 0.75rem;
    color: var(--muted);
}
.bsky-text {
    margin-top: 0.75rem;
    line-height: 1.6;
    word-wrap: break-word;
    font-size: 0.95rem;
}
.bsky-embed-images {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}
.bsky-embed-images img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #333;
}
.bsky-embed-quote {
    margin-top: 1rem;
    border: 1px solid #333;
    padding: 0.75rem;
    border-radius: var(--radius);
    background-color: rgba(255, 255, 255, 0.05); /* slightly lighter background */
}
.bsky-embed-quote .bsky-author { align-items: center; }
.bsky-embed-quote .bsky-avatar { width: 20px; height: 20px; }
.bsky-embed-quote .bsky-display-name, .bsky-embed-quote .bsky-handle { font-size: 0.8rem; }
.bsky-embed-quote .bsky-text { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }

.bsky-embed-external {
    margin-top: 1rem;
    border: 1px solid #333;
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    text-decoration: none;
}
.bsky-embed-external:hover {
    border-color: var(--accent);
}
.bsky-embed-external img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}
.bsky-embed-external-content {
    padding: 0.75rem;
}
.bsky-external-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.bsky-external-desc, .bsky-external-host {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 4px;
}
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


