/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 10002;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.user-menu:hover {
    background: var(--light-bg);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.dropdown {
    display: none;
    position: absolute;
    top: calc(100% - 0.25rem);
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    padding-top: 0.75rem;
}

.user-menu:hover .dropdown,
.dropdown:hover {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dropdown a:last-child {
    border-bottom: none;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta {
    margin-top: 2rem;
}

.small-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Stats Overview */
.stats-overview {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 100px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Clickable stat cards */
a.stat-card {
    display: block;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

a.stat-card:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

a.stat-card:active {
    transform: translateY(-1px);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    color: var(--secondary-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-sublabel {
    color: var(--secondary-color);
    font-size: 0.65rem;
    margin-top: 0.15rem;
    opacity: 0.8;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-warning {
    background: var(--warning-color);
    color: #000;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
}

.filters {
    display: flex;
    gap: 1rem;
}

.search-input, .filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-input {
    min-width: 250px;
}

/* Brickheadz Grid */
.brickheadz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.brickheadz-card {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.brickheadz-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.brickheadz-card.owned {
    border-color: #28a745;
    background: #f0fff4;
}

.brickheadz-card.owned:hover {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.card-image {
    position: relative;
    background: var(--light-bg);
    padding-top: 100%;
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

/* Image Slider */
.image-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.slider-image.active {
    opacity: 1;
}

.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    line-height: 1;
}

.slider-prev:hover, .slider-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-prev {
    left: 0;
}

.slider-next {
    right: 0;
}

.slider-dots {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.card-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    position: absolute;
}

.badge-retired {
    background: rgba(108, 117, 125, 0.9);
    color: #fff;
    top: 0.5rem;
    right: 0.5rem;
}

.badge-owned {
    background: #28a745;
    color: #fff;
    top: 0.5rem;
    left: 0.5rem;
    font-weight: 700;
}

.badge-wanted {
    background: #ffc107;
    color: #000;
    left: 0.5rem;
    font-weight: 700;
}
 
.badge-missing {
    background: #6c757d;
    color: #fff;
    left: 0.5rem;
    font-weight: 700;
}

/* Gift Badge - Interactive Button */
.badge-gift {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 2;
}

.badge-gift:hover {
    background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.badge-gift:active {
    transform: scale(0.98);
}

/* Stack gift badge when retired badge is present */
.badge-gift ~ .badge-retired {
    top: 2.5rem;
}

/* When both owned and wanted badges are present, stack them */
.badge-owned ~ .badge-wanted,
.card-image .badge-owned + .badge-wanted {
    top: 2.5rem;
}

/* When only wanted badge is present */
.card-image .badge-wanted:first-of-type {
    top: 0.5rem;
}

/* When missing badge is present */
.card-image .badge-missing:first-of-type {
    top: 0.5rem;
}

.badge-series {
    background: var(--primary-color);
    color: #fff;
}

.card-content {
    padding: 0.75rem;
}

.card-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.btn-info {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.7;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.btn-info:hover {
    opacity: 1;
    background: rgba(0, 102, 204, 0.1);
    transform: scale(1.1);
}

.set-number {
    color: var(--secondary-color);
    font-size: 0.8rem;
    font-weight: 600;
}

.box-number {
    background: #d01012;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(208, 16, 18, 0.3);
    letter-spacing: 0.5px;
}

.set-name {
    font-size: 1rem;
    margin: 0.35rem 0;
    min-height: 2.2rem;
    line-height: 1.3;
}

.set-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin: 0.35rem 0;
    font-size: 0.75rem;
}

.meta-series {
    background: var(--light-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    color: var(--primary-color);
    font-weight: 600;
    flex-shrink: 0;
}

.meta-year {
    color: var(--secondary-color);
    white-space: nowrap;
}

.set-pieces {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin: 0.35rem 0;
}

.series-badge {
    display: inline-block;
    background: var(--light-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}

.set-info {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin: 0.35rem 0;
}

.set-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #fffbea;
    border-left: 3px solid var(--warning-color);
    border-radius: 4px;
    font-size: 0.85rem;
}

.set-notes strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--dark-text);
}

.set-notes p {
    margin: 0;
    color: var(--secondary-color);
    line-height: 1.4;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: nowrap;
}

.card-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border: 2px solid var(--border-color);
    background: #fff;
    color: var(--dark-text);
    transition: all 0.2s;
}

.card-actions .btn:hover {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

.card-actions .btn-owned {
    border-color: var(--success-color);
    color: var(--success-color);
}

.card-actions .btn-owned:hover {
    background: #f0fff4;
    border-color: #28a745;
}

.card-actions .btn-owned.active {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
    font-weight: 600;
}

.card-actions .btn-owned.active:hover {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

.card-actions .btn-wanted.active {
    background: #ffc107;
    color: #000;
    border-color: #ffc107;
    font-weight: 600;
}

.card-actions .btn-wanted.active:hover {
    background: #e0a800;
    border-color: #d39e00;
    transform: translateY(-1px);
}

.card-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.card-actions .btn .icon {
    font-size: 1.1em;
    font-weight: bold;
}

.card-actions .btn .text {
    font-size: 0.85rem;
}

.card-actions .btn-notes {
    flex: 0 0 auto;
    min-width: 40px;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.card-actions .btn-notes:hover {
    background: #f8f9fa;
    border-color: var(--secondary-color);
}

.card-actions .btn-notes.has-notes {
    background: var(--warning-color);
    color: #000;
    border-color: var(--warning-color);
    position: relative;
}

.card-actions .btn-notes.has-notes:hover {
    background: #e0a800;
    border-color: #d39e00;
}

.card-actions .btn-notes.has-notes::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    border: 2px solid #fff;
}

.card-link {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.card-link:hover {
    text-decoration: underline;
}

/* Collection Filters */
.collection-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Checkbox Filter */
.checkbox-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.checkbox-filter:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
}

.checkbox-filter input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-filter span {
    font-size: 0.9rem;
    color: var(--dark-text);
    white-space: nowrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--dark-text);
    background: #fff;
    transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Search Container */
.search-container {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 6rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(232, 65, 24, 0.1);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 6px;
    background: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1rem;
    z-index: 2;
    height: calc(100% - 12px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--primary-hover);
}

.search-clear {
    position: absolute;
    right: 70px;
    top: 6px;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
    z-index: 1;
    line-height: 1;
    height: calc(100% - 12px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear:hover {
    color: var(--danger-color);
}

.search-results-info {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.search-results-info span {
    background: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

/* Series Statistics */
.series-stats-container {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.series-stats-container h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
}

.series-stats-section {
    margin: 3rem 0;
}

.series-stats-section .section-header {
    margin-bottom: 2rem;
}

.series-stats-section .section-description {
    color: #666;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.series-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.series-stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.series-stat-card {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.series-stat-card-link:hover .series-stat-card,
.series-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.series-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.series-stat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dark-text);
}

.series-stat-percentage {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.series-stat-percentage.complete {
    color: var(--success-color);
}

.series-stat-progress {
    margin-top: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 0.5s ease;
}

.series-stat-card:hover .progress-fill {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

.series-stat-count {
    font-size: 0.9rem;
    color: #666;
    text-align: right;
}

.series-stat-sets {
    font-size: 0.85rem;
    color: #888;
    text-align: right;
    margin-top: 0.25rem;
}

.completion-badge {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #d4edda;
    color: #155724;
    text-align: center;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.completion-badge.almost {
    background: #fff3cd;
    color: #856404;
}

.quick-actions {
    margin-top: 3rem;
    text-align: center;
}

/* Features Grid */
.features {
    margin: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
}

/* Footer */
.main-footer {
    background: var(--dark-text);
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
}

/* Profile Pages */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0 1.5rem 0;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-text);
    margin: 0;
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-section h2 {
    margin-bottom: 1.5rem;
}

.profile-info {
    margin-bottom: 2rem;
}

.profile-picture {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.info-item {
    margin-bottom: 1rem;
}

.info-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.info-note {
    font-size: 0.85rem;
    color: var(--secondary-color);
    display: block;
    margin-top: 0.25rem;
}

.profile-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group small {
    display: block;
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.share-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.share-url {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.share-url input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--light-bg);
}

/* Detail Page */
.breadcrumb {
    margin: 1rem 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.detail-image {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 2rem;
}

.detail-image img {
    width: 100%;
    height: auto;
}

.placeholder-image-large {
    width: 100%;
    padding-top: 100%;
    position: relative;
    background: var(--light-bg);
    border-radius: 8px;
}

.placeholder-image-large span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
}

.detail-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.set-number-large {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.detail-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.detail-specs {
    margin: 2rem 0;
}

.spec {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.spec-label {
    font-weight: 600;
    min-width: 150px;
}

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.detail-notes {
    margin: 2rem 0;
}

.detail-notes textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

/* Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
}

/* Public Profile */
.public-profile-header {
    text-align: center;
    padding: 2rem 0;
}

.profile-picture-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.profile-navigation {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.profile-navigation .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
}

.profile-navigation .nav-link:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

.collection-section {
    margin: 3rem 0;
    scroll-margin-top: 6rem;
}

.collection-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--light-bg);
    border-radius: 8px;
    margin: 2rem 0;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--secondary-color);
    margin: 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

.lightbox.show {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.7); }
    to { transform: scale(1); }
}

.lightbox-caption {
    margin-top: 15px;
    text-align: center;
    color: #ccc;
    padding: 10px;
    font-size: 1.1rem;
}

/* Gift Modal */
.gift-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

.gift-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gift-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.gift-modal-close:hover {
    color: #333;
}

.gift-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 12px 12px 0 0;
}

.gift-modal-header h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.5rem;
}

.gift-item-name {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.gift-modal-body {
    padding: 2rem;
    min-height: 150px;
}

.gift-status-container {
    text-align: center;
}

.gift-status-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.gift-status-container h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.2rem;
}

.gift-status-container p {
    margin: 0 0 1.5rem 0;
    color: #666;
    line-height: 1.6;
}

.gift-info-box {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.gift-info-box p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.gift-info-box strong {
    color: #333;
}

.gift-form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.gift-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.gift-form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.gift-form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.gift-form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #999;
    font-size: 0.8rem;
}

.gift-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.gift-modal-actions .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-gift-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #cc5500 100%);
    color: #fff;
}

.btn-gift-primary:hover {
    background: linear-gradient(135deg, #cc5500 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.btn-gift-success {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    color: #fff;
}

.btn-gift-success:hover {
    background: linear-gradient(135deg, #37b24d 0%, #51cf66 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(81, 207, 102, 0.3);
}

.btn-gift-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
}

.btn-gift-danger:hover {
    background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-gift-secondary {
    background: #f1f3f5;
    color: #495057;
}

.btn-gift-secondary:hover {
    background: #e9ecef;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lightbox-prev,
.lightbox-next {
    display: none; /* Hidden by default */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 30px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10000;
    border-radius: 4px;
}

.lightbox.show .lightbox-prev,
.lightbox.show .lightbox-next {
    display: block; /* Show when lightbox is active */
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10000;
}

/* Make slider images clickable (cursor pointer) */
.slider-image {
    cursor: zoom-in;
}

/* Responsive */
@media (max-width: 768px) {
    .detail-container {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filters {
        width: 100%;
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .collection-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-wrap: wrap;
    }
    
    .checkbox-filter {
        width: 100%;
        justify-content: center;
    }
    
    .series-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .series-stats-container {
        padding: 1rem;
    }
    
    .brickheadz-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .card-actions {
        flex-wrap: wrap;
    }
    
    .card-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
    }
    
    .card-actions .btn-notes {
        flex: 0 0 auto;
        min-width: 44px;
    }
}

/* Extra small devices - alleen 1 kolom als het echt niet anders kan */
@media (max-width: 300px) {
    .brickheadz-grid {
        grid-template-columns: 1fr;
    }
}

/* Feedback Toast */
.feedback-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.feedback-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.feedback-success {
    background: var(--success-color);
    color: #fff;
}

.feedback-error {
    background: var(--danger-color);
    color: #fff;
}

.feedback-info {
    background: var(--secondary-color);
    color: #fff;
}

@media (max-width: 768px) {
    .feedback-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--dark-text);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 150px;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background: #0052a3;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.back-to-top:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* =====================================================
   Info Modal (More Information)
   ===================================================== */
.info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.info-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.info-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 1;
}

.info-modal-close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.info-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 3rem 2rem 2rem;
    border-radius: 12px 12px 0 0;
}

.info-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.info-modal-body {
    padding: 2rem;
    line-height: 1.8;
    color: #333;
}

.info-modal-body h1,
.info-modal-body h2,
.info-modal-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #667eea;
}

.info-modal-body h1 { font-size: 1.8rem; }
.info-modal-body h2 { font-size: 1.5rem; }
.info-modal-body h3 { font-size: 1.2rem; }

.info-modal-body p {
    margin-bottom: 1rem;
}

.info-modal-body ul,
.info-modal-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.info-modal-body li {
    margin-bottom: 0.5rem;
}

.info-modal-body a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
}

.info-modal-body a:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

.info-modal-body blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

.info-modal-body code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.info-modal-body pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.info-modal-body pre code {
    background: transparent;
    padding: 0;
}

@media (max-width: 768px) {
    .info-modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .info-modal-header {
        padding: 1.5rem 2.5rem 1.5rem 1.5rem;
    }
    
    .info-modal-header h3 {
        font-size: 1.25rem;
    }
    
    .info-modal-body {
        padding: 1.5rem;
    }
}
