/* Base styles matching sidepanel */
html {
    height: 100vh;
    font-family: "Kumbh Sans", sans-serif;
}

body {
    width: 100%;
    background-color: #f7f7fb;
    color: #F9F9FF;
    position: relative;
    box-sizing: border-box;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

/* Header styles */
.browse-header {
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: white;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    height: 30px;
    width: auto;
}

.header-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #F9F9FF;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: #2196f3;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

.discord-btn {
    background-color: #5865f2;
    color: #F9F9FF;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-family: "Kumbh Sans", sans-serif;
    transition: background-color 0.2s;
}

.discord-btn:hover {
    background-color: #4752c4;
}

.discord-btn img {
    width: 18px;
    height: 18px;
}

.user-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.logout-btn {
    background-color: #3c3c3c;
    color: #F9F9FF;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #2a2a2a;
}

/* Main content */
.browse-main {
    flex: 1;
    padding: 20px;
}

.browse-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Search section */
.browse-search-section {
    margin-bottom: 20px;
}

.browse-search-section h1 {
    font-size: 24px;
    margin: 0 0 15px 0;
    color: #505050;
}

.browse-search {
    display: flex;
    gap: 8px;
}

.browse-search input {
    flex: 1;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 25px;
    font-size: 14px;
    font-family: "Kumbh Sans", sans-serif;
    background-color: #f6f6f6;
    color: #333333;
    border: 1px solid #ddd;
}

.browse-search input::placeholder {
    color: #8f8f8f;
}

/* Tags section - matching sidepanel exactly */
.tags-section {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    gap: 5px;
    padding: 8px;
    padding-bottom: 15px;
    min-height: 50px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 20px;
}

.tags-section::-webkit-scrollbar {
    display: none;
}

.tags-section .tagButton {
    font-size: 10.75px;
    display: flex;
    align-items: center;
    flex-direction: row;
    background-color: white;
    color: #555555;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    width: fit-content;
    box-sizing: border-box;
    white-space: nowrap;
    border-style: ridge;
    border: solid;
    border-width: 1px;
    border-color: #c8c8c8;
    color: #5d5d5d;
}

.tags-section .tagButton:hover {
    background-color: #4c4c4c;
}

.tags-section .tagButton.selected {
    background-color: #2196f3;
    color: #F9F9FF;
}

.tags-section .tagButton.selected:hover {
    background-color: #1976d2;
}

.tags-section .tagButton span:last-child {
    margin-left: 8px;
    font-size: 10px;
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.tags-section .tagButton.selected span:last-child {
    background-color: rgba(255, 255, 255, 0.25);
    opacity: 0.9;
}

/* Browse headings */
.browse-heading h3 {
    font-size: 17px;
    font-weight: 600;
    color: #505050;
    margin: 0px;
    padding: 7px;
}

/* Featured container - horizontal scroll */
.browse-featured-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0px 0px 0px 8px;
    margin-bottom: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
}

.browse-featured-container::-webkit-scrollbar {
    height: 8px;
}

.browse-featured-container::-webkit-scrollbar-track {
    background: transparent;
}

.browse-featured-container::-webkit-scrollbar-thumb {
    background: rgba(102, 102, 102, 0.6);
    border-radius: 4px;
}

/* All characters section */
.browse-all-section {
    margin-bottom: 10px;
    border-radius: 4px;
    padding: 0px 8px 0px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.browse-chars-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    overflow-y: visible;
    padding: 0px;
    justify-content: flex-start;
    margin-bottom: 0;
    align-content: flex-start;
    align-items: flex-start;
    width: 100%;
}

/* Character cards - responsive width */
.browse-character-card {
    width: calc(25% - 6px);
    min-width: 240px;
    height: 190px;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    flex-grow: 0;
    box-shadow: 1px 2px 3px #b1b1b1;
    background-color: white;
}

.browse-character-card:hover {
    transform: translateY(-2px);
}

.browse-character-card.hidden {
    display: none !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.browse-character-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center 30%;
}

.user-name {
    color: black;
}

.browse-character-content {
    padding: 8px;
    gap: 2px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
    margin: 0;
}

.browse-character-header {
    margin-bottom: -5px;
}

.browse-character-name {
    color: black;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin: 0;
}

.browse-user-attribution {
    font-size: 9px;
    color: #919191;
    margin: 0 0 2px 0;
    font-weight: 400;
    line-height: 1.2;
    font-style: italic;
}

/* Character tags */
.browse-character-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    min-height: 22px;
    align-items: flex-start;
    background: white;
}

.browse-tag-item {
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 1;
    height: 15px;
    border-style: ridge;
    border: solid;
    border-width: 1px;
    border-color: #c8c8c8;
    color: #5d5d5d;;
}

.browse-tag-item.more-tag {
    flex-shrink: 0;
    max-width: 15px;
}

/* Download button */
.download-button {
    visibility: hidden;
    cursor: pointer;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 3px 0px;
    width: 98px;
    height: 21px;
    margin: 0;
    font-size: 12px;
    transition: background-color 0.2s;
}

.download-button-panel {
    visibility: hidden;
    cursor: pointer;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 3px 0px;
    width: 100%;
    height: 37px;
    margin: 0;
    font-size: 15px;
    transition: background-color 0.2s;
}

.download-button:hover {
    background-color: #1976d2;
}

.download-button-panel:hover {
    background-color: #1976d2;
}

/* Download overlay */
.download-overlay {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgb(220, 220, 220);
    color: rgb(126, 126, 126);
    border-radius: 8px;
    font-weight: 300;
    font-family: 'Kumbh Sans', sans-serif;
    font-size: 9px;
    padding: 2px 4px;
}

/* Favorite star */
.favorite-star {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    text-shadow: 0 0 3px black;
    font-size: 20px;
    color: #FFFFFF;
}

/* Featured character cards - fixed width for horizontal scroll */
#browse-featured .browse-character-card {
    width: 380px;
    height: 300px;
    flex-shrink: 0;
    flex-grow: 0;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.15);
    transform: scale(1);
    transition: all 0.3s ease;
}

#browse-featured .browse-character-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 4px 8px 20px rgba(0, 0, 0, 0.2);
}

#browse-featured .browse-character-image {
    height: 200px;
}

#browse-featured .browse-character-content {
    justify-content: space-between;
    padding: 12px;
    gap: 5px;
    background-color: white;
}

#browse-featured .browse-character-name {
    color: black;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

#browse-featured .browse-user-attribution {
    font-size: 12px;
}

#browse-featured .browse-tag-item {
    font-size: 10px;
    padding: 2px 6px;
    height: 18px;
    max-width: 80px;
    border-style: ridge;
    border: solid;
    border-width: 1px;
    border-color: #c8c8c8;
    color: #5d5d5d;
}

#browse-featured .download-button {
    font-size: 14px;
    width: 85px !important;
}

#browse-featured .download-overlay {
    font-size: 11px;
    padding: 2px 6px;
}

/* Loading spinner */
.browse-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 30px 0;
}

.browse-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #444;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.browse-error {
    text-align: center;
    color: #ff6b6b;
    padding: 20px;
    width: 100%;
}

/* No results */
.browse-no-results {
    text-align: center;
    color: #cccccc;
    padding: 40px 20px;
}

/* Character detail panel - frosted glass modal */
.character-detail-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    animation: fadeInBackdrop 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeInBackdrop {
    from {
        opacity: 0;
        backdrop-filter: blur(0px) saturate(100%);
        -webkit-backdrop-filter: blur(0px) saturate(100%);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
    }
}

.character-detail-panel > div {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(80px) saturate(220%) brightness(115%) contrast(105%);
    -webkit-backdrop-filter: blur(80px) saturate(220%) brightness(115%) contrast(105%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 32px;
    max-width: 1300px;
    width: 100%;
    max-height: 85vh;
    height: auto;
    overflow: hidden;
    padding: 0;
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.15),
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.05),
        0 5px 10px rgba(0, 0, 0, 0.03),
        0 0 0 0.5px rgba(255, 255, 255, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.03);
    display: flex;
    position: relative;
    animation: slideInModal 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.character-detail-panel > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 25%, 
        transparent 75%, 
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 32px;
    pointer-events: none;
}

@keyframes slideInModal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close button - positioned absolutely */
.detail-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.detail-close-button:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Header - hidden since we're using absolute close button */
.character-detail-header {
    display: none;
}

/* Left side - Character card focus */
.character-detail-left {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    background: rgba(248, 250, 252, 0.4);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    position: relative;
    overflow: hidden;
    border-radius: 28px 0 0 28px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.character-detail-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(33, 150, 243, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(156, 39, 176, 0.04) 0%, transparent 50%);
    animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.character-focus-card {
    position: relative;
    z-index: 2;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.12),
        0 8px 25px rgba(33, 150, 243, 0.08),
        0 0 0 1px rgba(33, 150, 243, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    animation: cardFloat 8s ease-in-out infinite;
    max-width: 380px;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.character-focus-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(33, 150, 243, 0.6), transparent);
    border-radius: 24px 24px 0 0;
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg);
    }
    33% {
        transform: translateY(-6px) rotateY(1deg);
    }
    66% {
        transform: translateY(-3px) rotateY(-0.5deg);
    }
}

.character-focus-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(33, 150, 243, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.character-focus-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 18px;
    object-fit: cover;
    border: 2px solid rgba(33, 150, 243, 0.2);
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(33, 150, 243, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.character-focus-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05) 0%, transparent 50%, rgba(156, 39, 176, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.character-focus-card:hover .character-focus-image::after {
    opacity: 1;
}

.character-focus-name {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin: 0 0 16px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.character-focus-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.character-focus-type {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.character-focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    max-width: 100%;
}

.character-focus-tag {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 500;
    border: 1px solid rgba(33, 150, 243, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.character-focus-tag:hover {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.character-focus-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    border: 1px solid rgba(33, 150, 243, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.character-focus-author:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
}

.character-focus-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    flex-shrink: 0;
}

.character-focus-author-info {
    flex: 1;
    min-width: 0;
}

.character-focus-author-info span {
    color: #444;
    font-size: 12px;
    font-weight: 500;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Download button under character card */
.character-focus-download {
    margin-top: 24px;
    width: 76%;
    display: flex; 
    justify-content: center;
}

.character-focus-download-button {
    width: 100%;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: "Kumbh Sans", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 12px 30px rgba(33, 150, 243, 0.25),
        0 4px 12px rgba(33, 150, 243, 0.15);
    backdrop-filter: blur(10px);
}

.character-focus-download-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.character-focus-download-button:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(33, 150, 243, 0.35),
        0 8px 20px rgba(33, 150, 243, 0.2);
}

.character-focus-download-button:hover::before {
    left: 100%;
}

.character-focus-download-button:active {
    transform: translateY(-2px);
}

.character-focus-download-button i {
    font-size: 14px;
}

/* Right side - Character details */
.character-detail-right {
    flex: 1;
    padding: 50px 40px;
    background: rgba(252, 253, 255, 0.3);
    backdrop-filter: blur(25px) saturate(140%) brightness(105%);
    -webkit-backdrop-filter: blur(25px) saturate(140%) brightness(105%);
    overflow-y: auto;
    position: relative;
    border-radius: 0 28px 28px 0;
}

.character-detail-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0.5px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.detail-content-wrapper {
    max-width: 600px;
    animation: slideInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.detail-section {
    margin-bottom: 35px;
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-fill-mode: both;
}

.detail-section:nth-child(1) { animation-delay: 0.1s; }
.detail-section:nth-child(2) { animation-delay: 0.2s; }
.detail-section:nth-child(3) { animation-delay: 0.3s; }
.detail-section:nth-child(4) { animation-delay: 0.4s; }
.detail-section:nth-child(5) { animation-delay: 0.5s; }
.detail-section:nth-child(6) { animation-delay: 0.6s; }

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

.detail-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2196f3;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #2196f3, #1976d2);
    border-radius: 2px;
}

.detail-section-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(33, 150, 243, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.detail-section-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(33, 150, 243, 0.2);
}

.detail-text {
    color: #444;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
}

.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-stat-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(33, 150, 243, 0.1);
    transition: all 0.3s ease;
}

.detail-stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.15);
}

.detail-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2196f3;
    display: block;
    margin-bottom: 5px;
}

.detail-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Tags styling */
.detail-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tag-item {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(33, 150, 243, 0.05));
    color: #2196f3;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(33, 150, 243, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.detail-tag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.detail-tag-item:hover {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
}

.detail-tag-item:hover::before {
    left: 100%;
}

/* Author section */
.detail-author-section {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(156, 39, 176, 0.05));
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(33, 150, 243, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.detail-author-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.detail-author-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Download button */
.detail-action-button {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    font-family: "Kumbh Sans", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

.detail-action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.detail-action-button:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(33, 150, 243, 0.4);
}

.detail-action-button:hover::before {
    left: 100%;
}

.detail-action-button:active {
    transform: translateY(-1px);
}

/* Responsive design for detail panel */
@media (max-width: 1024px) {
    .character-detail-panel > div {
        flex-direction: column;
    }
    
    .character-detail-left {
        flex: 0 0 40%;
        padding: 40px 30px 20px 30px;
    }
    
    .character-detail-right {
        flex: 1;
        padding: 20px 30px 40px 30px;
    }
    
    .character-focus-card {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .character-detail-left {
        padding: 30px 20px 15px 20px;
    }
    
    .character-detail-right {
        padding: 15px 20px 30px 20px;
    }
    
    .detail-close-button {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .character-focus-card {
        padding: 20px;
        max-width: 280px;
    }
    
    .character-focus-name {
        font-size: 20px;
    }
    
    .detail-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tags in detail panel */
#detail-character-tags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}

#detail-character-tags .selected-tag-item {
    background-color: #626262;
    color: #F9F9FF;
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    user-select: none;
    width: fit-content;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: visible;
    text-overflow: unset;
    flex: none;
    min-width: auto;
}

#detail-character-tags .selected-tag-item:hover {
    background-color: #2196f3;
}

/* Auth modal - matching sidepanel */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-modal-content {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.auth-modal h2 {
    margin-top: 0;
    color: #F9F9FF;
}

.auth-modal p {
    margin-bottom: 20px;
    color: #ccc;
}

.auth-btn {
    background-color: #5865f2;
    color: #F9F9FF;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    font-weight: bold;
    font-family: "Kumbh Sans", sans-serif;
    transition: background-color 0.2s;
}

.auth-btn:hover {
    background-color: #4752c4;
}

.auth-btn img {
    width: 20px;
    height: 20px;
}

/* Responsive design */
@media (max-width: 1200px) {
    .browse-character-card {
        width: calc(33.333% - 6px);
    }
}

@media (max-width: 900px) {
    .browse-character-card {
        width: calc(50% - 4px);
    }
}

@media (max-width: 600px) {
    .browse-main {
        padding: 10px;
    }
    
    .browse-character-card {
        width: 100%;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-nav {
        order: 2;
    }
    
    .header-auth {
        order: 3;
    }
}
