/* === BACKGROUND CANVAS STYLES (Page Specific) === */
/* This ensures the body and canvas are set up for the background effect. */
body {
    /* Override body background for cosmic background pages */
    background-color: transparent !important;
    background-image: none !important;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* CRITICAL: Places the canvas behind all other content */
}

/* Ensure the main page container sits above the canvas and has a transparent background */
#page-wrapper {
    position: relative; /* Establishes a stacking context */
    z-index: 1;      /* Ensures it's above the canvas (z-index: -1) */
    background-color: transparent; /* Allows the canvas to be visible through it */
}

/* === TIER LIST PAGE STYLES === */

/* 1. Root Variables & Basic Setup */
:root {
    --tier-s-header: #ff4757; /* S-Tier: Vibrant Red */
    --tier-a-header: #fbc531; /* A-Tier: Strong Yellow */
    --tier-b-header: #487eb0; /* B-Tier: Solid Blue */
    --tier-c-header: #27ae60; /* C-Tier: Reliable Green */
    --tier-d-header: #e67e22; /* D-Tier: Warning Orange */
    --tier-f-header: #8395a7; /* F-Tier: Neutral Grey */
    --border-color: #30363d;
    --bg-darker: #0d1117;
    --bg-dark: #161b22;
    --accent-blue: #58a6ff;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
}
.tier-list-main {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem;
}

/* 2. Page Header & Main Controls */
.page-header { 
    text-align: center; 
    margin-bottom: 2rem; 
    opacity: 0; /* Starts the header as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the header down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the header when it becomes visible (class added by JavaScript). */
.page-header.visible {
    opacity: 1; /* Makes the header fully visible. */
    transform: translateY(0); /* Moves the header to its original position. */
}

.tier-controls { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.75rem; 
    justify-content: center; 
    margin-top: 1.5rem; 
    opacity: 0; /* Starts the tier controls as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the tier controls down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the tier controls when they become visible (class added by JavaScript). */
.tier-controls.visible {
    opacity: 1; /* Makes the tier controls fully visible. */
    transform: translateY(0); /* Moves the tier controls to their original position. */
}
.tier-controls button { display: flex; align-items: center; gap: 0.5rem; }
.tier-controls button svg { width: 1rem; height: 1rem; }

/* 3. Main Workspace Layout */
.tier-list-workspace { 
    display: flex; 
    gap: 1.5rem; 
    align-items: flex-start; 
    opacity: 0; /* Starts the tier list workspace as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the tier list workspace down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the tier list workspace when it becomes visible (class added by JavaScript). */
.tier-list-workspace.visible {
    opacity: 1; /* Makes the tier list workspace fully visible. */
    transform: translateY(0); /* Moves the tier list workspace to its original position. */
}
.tier-list-main-panel { flex-grow: 1; }
.tier-list-sidebar { 
    width: 42rem; 
    flex-shrink: 0; 
    position: sticky; 
    top: 1.25rem; 
    opacity: 0; /* Starts the sidebar as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the sidebar down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the sidebar when it becomes visible (class added by JavaScript). */
.tier-list-sidebar.visible {
    opacity: 1; /* Makes the sidebar fully visible. */
    transform: translateY(0); /* Moves the sidebar to its original position. */
}

/* 4. Tier Rows - Redesigned for a more modern, consistent look */
.tier-row {
    opacity: 0; /* Starts the tier row as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the tier row down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, border-color 0.2s ease, box-shadow 0.2s ease; /* Adds smooth transitions for appearance effects. */
    display: flex;
    min-height: 6.25rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    /* The colored left border is the primary tier indicator */
    border-left: 5px solid var(--tier-color, var(--tier-f-header));
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: var(--bg-dark); /* Solid background for a cleaner look */
}

/* Defines the style for the tier row when it becomes visible (class added by JavaScript). */
.tier-row.visible {
    opacity: 1; /* Makes the tier row fully visible. */
    transform: translateY(0); /* Moves the tier row to its original position. */
}

/* Subtle hover effect to indicate interactivity */
.tier-row:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(88, 166, 255, 0.15);
}

.tier-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 6rem; /* A bit more space for the label and controls */
    flex-shrink: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background-color: var(--tier-color, var(--tier-f-header));
    position: relative;
    box-sizing: border-box;
}

.tier-grid {
    padding: 0.75rem;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.625rem;
}

/* Tier Header Controls - Appear on hover for a cleaner interface */
.tier-header-controls {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.2s ease-in-out;
}

/* Show controls when hovering over the tier header specifically */
.tier-header:hover .tier-header-controls {
    opacity: 1;
}

/* Styling for the individual buttons (edit, delete, drag) on the tier header */
.tier-control-btn {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.8);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease-in-out;
}

.tier-control-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.tier-control-btn svg {
    width: 0.875rem;
    height: 0.875rem;
}

.tier-drag-handle {
    cursor: ns-resize;
}

/* Add Tier Button */
.add-tier-container {
    padding: 1rem 0;
    text-align: center;
}
#add-tier-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
#add-tier-btn svg {
    width: 1rem;
    height: 1rem;
}


/* 5. Hero Portraits & Annotations */
.hero-portrait-wrapper { position: relative; }
.hero-portrait { display: block; width: 4.6875rem; height: 4.6875rem; border-radius: 0.375rem; background-color: var(--bg-darker); cursor: grab; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.4); border: 0.125rem solid transparent; }
.hero-portrait:hover { transform: scale(1.08); box-shadow: 0 0 0.9375rem 0.25rem var(--accent-blue); border-color: var(--accent-blue); }
.hero-portrait.sortable-chosen { cursor: grabbing; transform: scale(1.1); box-shadow: 0 0 1.25rem 0.3125rem var(--accent-blue); }
.sortable-ghost { opacity: 0.4; border: 0.125rem dashed var(--accent-blue); box-shadow: none; transform: scale(1.0); background: rgba(88, 166, 255, 0.1); }

.note-indicator { position: absolute; bottom: 0.125rem; right: 0.125rem; width: 1.125rem; height: 1.125rem; background-color: var(--accent-blue); color: var(--bg-darker); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: bold; cursor: help; box-shadow: 0 0 0.3125rem rgba(0,0,0,0.5); transition: transform 0.2s ease; }
.note-indicator:hover { transform: scale(1.2); }
.edit-note-btn { position: absolute; top: 0.25rem; right: 0.25rem; width: 1.5rem; height: 1.5rem; background-color: rgba(13, 17, 23, 0.8); border-radius: 50%; display: none; align-items: center; justify-content: center; cursor: pointer; border: 1px solid var(--border-color); }
.hero-portrait-wrapper:hover .edit-note-btn { display: flex; }
.edit-note-btn svg { width: 0.875rem; height: 0.875rem; fill: var(--text-primary); }

/* 6. Unranked Sidebar */
.unranked-section { background: linear-gradient(to bottom, var(--bg-dark), var(--bg-darker)); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 1rem; }
.unranked-header { text-align: center; margin-bottom: 1rem; } .unranked-header h3 { margin: 0 0 0.25rem 0; } .unranked-header p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }

/* Container for the hero search input */
.unranked-search-container {
    margin-bottom: 1rem;
}

/* Styles for the hero search input, consistent with other inputs */
#unranked-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
    box-sizing: border-box;
}

#unranked-search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 0.1875rem rgba(88, 166, 255, 0.3);
}

.unranked-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-btn {
    flex-grow: 1;
    padding: 0.5rem 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--color-background-tertiary, var(--bg-darker)); /* Fallback added */
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: var(--color-background-hover, #30363d); /* Fallback added */
    color: var(--text-primary);
}

.filter-btn.active {
    background-color: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.unranked-roster-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    justify-items: center;
    max-width: 100%;
    max-height: calc(100vh - 17.5rem); /* Makes the grid scrollable past a certain height */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem; /* Creates a small gutter for the scrollbar */
}

.unranked-roster-grid .hero-portrait:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0.9375rem 0.25rem var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Custom scrollbar for WebKit browsers (Chrome, Safari, etc.) */
.unranked-roster-grid::-webkit-scrollbar {
    width: 0.5rem;
}

.unranked-roster-grid::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 0.625rem;
}

.unranked-roster-grid::-webkit-scrollbar-thumb {
    background: #4f565e;
    border-radius: 0.625rem;
    border: 0.125rem solid var(--bg-darker); /* Adds padding around thumb */
}

.unranked-roster-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 7. Tabbed Interface */
.secondary-content-container { max-width: 60rem; margin: 3rem auto 0 auto; }
.secondary-content-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 1.5rem; }
.tab-btn { background: none; border: none; color: var(--text-secondary); padding: 0.75rem 1.5rem; font-size: 1.1rem; font-weight: 500; cursor: pointer; border-bottom: 0.1875rem solid transparent; transition: color 0.2s, border-color 0.2s; }
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: #fff; border-bottom-color: var(--accent-blue); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 8. Search & Filters */
.search-container { margin-bottom: 1.5rem; }
#search-form { display: flex; gap: 0.5rem; }
#search-input { flex-grow: 1; padding: 0.5rem 0.75rem; font-size: 1rem; background-color: var(--bg-darker); border: 1px solid var(--border-color); border-radius: 0.375rem; color: var(--text-primary); }
#search-input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 0.1875rem rgba(88, 166, 255, 0.3); }

/* 9. Enhanced Saved Lists Section */
.user-lists-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.saved-list-card {
    display: flex;
    gap: 1rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    align-items: stretch; /* Make columns same height */
}
.saved-list-card:hover { background-color: #1f242c; border-color: var(--accent-blue); transform: translateY(-0.1875rem); box-shadow: 0 0.25rem 0.9375rem rgba(0,0,0,0.2); }

.list-card-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.list-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex-grow: 1; }
.list-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.list-patch-tag { background-color: var(--border-color); color: var(--text-secondary); font-size: 0.75rem; font-weight: 500; padding: 0.125rem 0.5rem; border-radius: 0.75rem; }
.list-title { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); }
.list-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(0.9rem * 1.5 * 2); /* Reserve space for 2 lines */
    flex-grow: 1; /* Pushes meta to the bottom */
}
.list-card-meta { font-size: 0.85rem; color: var(--text-secondary); }
.list-card-meta strong { color: var(--text-primary); font-weight: 600; }

.list-card-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
    flex-shrink: 0;
}

.list-voting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.vote-btn { background: none; border: 1px solid transparent; border-radius: 0.375rem; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.vote-btn:hover { color: var(--accent-blue); background-color: rgba(88, 166, 255, 0.1); }
.vote-btn.upvote.voted { color: var(--tier-a-header); }
.vote-btn.downvote.voted { color: var(--tier-s-header); }
.vote-btn svg { width: 1.5rem; height: 1.5rem; }
.vote-count { font-weight: bold; font-size: 1.2rem; color: var(--text-primary); min-width: 2ch; text-align: center; }

.list-card-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}
.stat-item { display: flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.stat-item svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.stat-item span { font-weight: 500; color: var(--text-primary); }

.list-card-controls {
    display: flex;
    gap: 0.5rem;
}
.list-card-controls .btn-small {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.list-card-controls .btn-small svg {
    width: 1rem;
    height: 1rem;
}
.btn-small { padding: 0.25rem 0.75rem; font-size: 0.85rem; font-weight: 500; }
.btn-danger { background-color: transparent; border-color: var(--tier-s-header); color: var(--tier-s-header); }
.btn-danger:hover { background-color: var(--tier-s-header); color: #fff; }

/* 10. Comment Section */
.comments-section { padding: 0; border: none; }
#comment-form textarea { width: 100%; min-height: 6.25rem; padding: 0.75rem; background-color: var(--bg-darker); border: 1px solid var(--border-color); border-radius: 0.375rem; color: var(--text-primary); font-size: 1rem; resize: vertical; margin-bottom: 1rem; }
.comment { background-color: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 1rem 1.5rem; margin-bottom: 1rem; }
.comment-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.comment-author { font-weight: bold; color: var(--text-primary); }
.comment-body { line-height: 1.6; white-space: pre-wrap; }

/* 11. Toast Notifications */
#toast-container { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.625rem; }
.toast { background-color: #21262d; color: var(--text-primary); padding: 0.75rem 1.25rem; border-radius: 0.375rem; border: 1px solid var(--border-color); box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.3); opacity: 0; transform: translateY(1.25rem); transition: opacity 0.3s ease, transform 0.3s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

/* 12. Sorting Controls */
.sorting-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background-color: var(--bg-dark);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    justify-content: center; /* Center the buttons */
}

.sort-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.sorting-controls .btn-secondary {
    border-color: transparent;
    background-color: transparent;
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
}

.sorting-controls .btn-secondary:hover {
    background-color: rgba(88, 166, 255, 0.1);
    color: var(--accent-blue);
}

.sorting-controls .btn-secondary.active {
    background-color: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

/* 13. Save Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 17, 23, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001; /* Above toast container */
    backdrop-filter: blur(0.3125rem);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    width: 100%;
    max-width: 31.25rem;
    box-shadow: 0 0.625rem 1.875rem rgba(0,0,0,0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

/* When the modal becomes visible */
.modal-overlay:not([style*="display: none"]) {
    opacity: 1;
}

.modal-overlay:not([style*="display: none"]) .modal-content {
    transform: scale(1);
}

.modal-content h2 {
    margin-top: 0;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
    box-sizing: border-box; /* Important for width calculation */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 0.1875rem rgba(88, 166, 255, 0.3);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* Custom styling for the color input */
#tier-color-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 2.5rem;
    padding: 0;
    border: none;
    background-color: transparent;
    cursor: pointer;
}
#tier-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
}
#tier-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 0.375rem;
}
#tier-color-input::-moz-color-swatch {
    border: none;
    border-radius: 0.375rem;
}


/* 13. Responsiveness */
@media (max-width: 64rem) {
    .tier-list-workspace { flex-direction: column; }
    .tier-list-sidebar { width: 100%; position: static; margin-top: 2rem; }
}
@media (max-width: 48rem) {
    .tier-controls { flex-direction: column; align-items: stretch; }
    .secondary-content-tabs { flex-wrap: wrap; }
    .saved-list-card { flex-direction: column; }
    .list-card-stats { flex-direction: row; border-left: none; border-top: 1px solid var(--border-color); padding-left: 0; padding-top: 1rem; justify-content: flex-start; }
}

/* === ADDITIONAL ANIMATION STYLES === */

/* Add Tier Container Animation */
.add-tier-container {
    opacity: 0; /* Starts the add tier container as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the add tier container down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the add tier container when it becomes visible (class added by JavaScript). */
.add-tier-container.visible {
    opacity: 1; /* Makes the add tier container fully visible. */
    transform: translateY(0); /* Moves the add tier container to its original position. */
}

/* Secondary Content Container Animation */
.secondary-content-container {
    opacity: 0; /* Starts the secondary content container as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the secondary content container down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the secondary content container when it becomes visible (class added by JavaScript). */
.secondary-content-container.visible {
    opacity: 1; /* Makes the secondary content container fully visible. */
    transform: translateY(0); /* Moves the secondary content container to its original position. */
}

/* Secondary Content Tabs Animation */
.secondary-content-tabs {
    opacity: 0; /* Starts the secondary content tabs as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the secondary content tabs down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the secondary content tabs when they become visible (class added by JavaScript). */
.secondary-content-tabs.visible {
    opacity: 1; /* Makes the secondary content tabs fully visible. */
    transform: translateY(0); /* Moves the secondary content tabs to their original position. */
}

/* Secondary Content Panels Animation */
.secondary-content-panels {
    opacity: 0; /* Starts the secondary content panels as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the secondary content panels down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the secondary content panels when they become visible (class added by JavaScript). */
.secondary-content-panels.visible {
    opacity: 1; /* Makes the secondary content panels fully visible. */
    transform: translateY(0); /* Moves the secondary content panels to their original position. */
}