/* --------------------------------- */
/* Google Fonts & Genel Ayarlar      */
/* --------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;900&display=swap');

:root {
    /* Renk Paleti */
    --primary-color: #705898;
    --primary-dark-purple: #4a3a6b;
    --secondary-color: #f1f3f5;
    --light-color: #FFFFFF;
    --dark-color: #343a40;
    --text-color: #343a40;
    --text-light: #6b7280;
    --bg-color: #f8f9fa;
    --border-color: #dee2e6;
    --pokemon-yellow: #ffca2c;
    --pokemon-blue: #705898;
    --pokeball-red: #dc3545;
    --success-green: #28a745;
    --rarity-common: #343a40;
    --rarity-uncommon: #28a745;
    --rarity-rare: #007bff;
    --rarity-holo: #e6a800;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* --------------------------------- */
/* Ana İçerik ve Header              */
/* --------------------------------- */
.main-content {
    flex-grow: 1;
    padding: 2rem 0;
}

.main-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 1.8rem; font-weight: 900; text-decoration: none; color: var(--primary-dark-purple); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; list-style: none; align-items: center; gap: 1rem; }
.main-nav a { text-decoration: none; color: var(--text-color); font-weight: 600; padding: 8px 16px; border-radius: 8px; transition: all 0.3s ease; }
.main-nav a:hover { color: var(--light-color); background-color: var(--pokemon-blue); }
.main-nav .btn-logout { background-color: var(--primary-color); color: var(--light-color); }


/* --------------------------------- */
/* Koleksiyon Sayfası Stilleri       */
/* --------------------------------- */
.collection-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}
.side-menu {
    flex: 0 0 340px;
    background-color: var(--light-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 2rem;
    max-height: 90vh;
    overflow-y: auto;
}
.main-grid-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.0rem;
}

.primary-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}
.btn-tab {
    flex: 1;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-light);
    position: relative;
    transition: color 0.3s ease;
}
.btn-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.btn-tab:hover {
    color: var(--primary-dark-purple);
}
.btn-tab.active {
    color: var(--primary-color);
}
.btn-tab.active::after {
    transform: scaleX(1);
}
#collection-mode-content, #add-card-mode-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.language-switcher {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #e9ecef;
    border-radius: 10px;
    padding: 4px;
    overflow: hidden;
}
.language-switcher::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background-color: var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(112, 88, 152, 0.4);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.language-switcher[data-selected-lang="jp"]::before {
    transform: translateX(100%);
}
.btn-lang {
    flex: 1;
    padding: 8px;
    font-size: 0.9rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-light);
    z-index: 1;
    transition: color 0.4s ease;
}
.btn-lang.active {
    color: var(--light-color);
}
.sets-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
	padding-top: 0.5rem;
}

.series-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 10px;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.series-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.series-header.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background-color: #f1f3f5;
}
.series-header .series-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-dark-purple);
}
.sets-in-series {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    margin-top: -10px;
    padding: 10px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease-out;
    opacity: 0;
}
.sets-in-series.expanded {
    max-height: 1000px;
    opacity: 1;
}

.menu-item {
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}
.menu-item.all-sets {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 10px;
    background-color: #f1f3f5;
    color: var(--primary-dark-purple);
    border: 1px solid var(--border-color);
    padding: 12px 15px;
}
.menu-item.all-sets:hover {
    transform: translateY(-2px);
    color: var(--primary-color);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}
.menu-item.all-sets.active {
    transform: translateY(0);
    background: var(--primary-color);
    color: var(--light-color);
    box-shadow: 0 6px 15px rgba(112, 88, 152, 0.4);
    border-color: transparent;
}
.menu-item.set-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    color: var(--dark-color);
}
.menu-item.set-item:hover {
    background-color: #e9e5f3;
}
.menu-item.set-item.active {
    background-color: var(--primary-color);
    color: var(--light-color);
    box-shadow: 0 5px 15px rgba(112, 88, 152, 0.3);
}
.menu-item.set-item.active .set-name,
.menu-item.set-item.active .progress-text {
    color: var(--light-color);
}
.set-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.set-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.progress-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
}
.progress-bar {
    height: 6px;
    width: 100%;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--pokemon-yellow);
    transition: width 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.menu-item.set-item.active .progress-bar {
    background-color: rgba(255, 255, 255, 0.3);
}
.menu-item.set-item.active .progress-fill {
    background: var(--light-color);
}

/* --- KART EKLEME MENÜSÜ --- */
.section-title {
    font-weight: 700;
    color: var(--primary-dark-purple);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.search-container {
    position: relative;
}
#universal-search {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
#universal-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(112, 88, 152, 0.2);
}
.search-container .icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}
.search-result-container {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}
.btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-action:hover {
    border-color: var(--primary-color);
    background-color: #f5f3f9;
    color: var(--primary-color);
}
.btn-action.active {
    border-color: var(--primary-color);
    background-color: #f5f3f9;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(112, 88, 152, 0.2);
}
.btn-action svg {
    width: 24px;
    height: 24px;
}

/* --- ANA KART ALANI --- */
.grid-header {
    background: var(--light-color);
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}
.grid-header-title h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark-purple);
    margin: 0;
}
.grid-header-title p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}
.grid-header-actions {
    display: flex;
    gap: 0.75rem;
}
.btn-grid-action {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-grid-action:hover {
    background-color: var(--primary-dark-purple);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.btn-grid-action.danger {
    background-color: var(--pokeball-red);
}
.btn-grid-action.danger:hover {
    background-color: #a71d2a;
}
.btn-grid-action.secondary {
    background-color: var(--border-color);
    color: var(--dark-color);
}
#card-grid-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-light);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    min-height: 500px;
}
#card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
    animation: fadeInGrid 0.5s ease-out;
}
@keyframes fadeInGrid {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    background: var(--light-color);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}
.card.owned-in-search::after {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
}
.card.unowned {
    filter: grayscale(1) brightness(0.95);
    opacity: 0.7;
}
.card.unowned:hover {
    filter: grayscale(0) brightness(1);
    opacity: 1;
}
.card:hover {
    transform: none;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.1),
        0 0 18px 4px rgba(112, 88, 152, 0.4);
    border-color: var(--primary-color);
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}
.card.selection-mode {
    cursor: copy;
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.card-img-wrapper {
    aspect-ratio: 5/7;
    background-color: #f0f0f0;
}
.card img {
    width: 100%;
    display: block;
    object-fit: cover;
}
.card-info {
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-title-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 4px;
}
.card-lang {
    background-color: var(--primary-dark-purple);
    color: var(--light-color);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.2;
    flex-shrink: 0;
}
.card-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-set {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}
.owned-variants-list {
    margin-top: auto;
    padding-top: 8px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    border-top: 1px solid var(--border-color);
}
.owned-instance {
    background-color: #e9e5f3;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark-purple);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.remove-instance-icon {
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-light);
    transition: color 0.2s ease, transform 0.2s ease;
    margin-left: 5px;
}
.remove-instance-icon:hover {
    color: var(--pokeball-red);
    transform: scale(1.2);
}

/* --- Checklist Stilleri --- */
#checklist-view {
    background-color: var(--light-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden; /* İçerik taşarsa kaydırma çubuğu */
    border: 1px solid var(--border-color);
}
.checklist-main-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #fafbff;
}
.checklist-main-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark-purple);
}
.checklist-main-header p {
    color: var(--text-light);
    font-size: 1rem;
}
.checklist-controls {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--light-color);
}
.select-all-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.select-all-container label {
    font-weight: 600;
    color: var(--dark-color);
}
#select-all-cards {
    width: 22px;
    height: 22px;
    accent-color: var(--primary-color);
    cursor: pointer;
}
.card.selected {
    box-shadow: var(--shadow),
                0 0 0 2px var(--primary-color); 
}
.checklist-body {
    padding: 1.5rem;
    max-height: 55vh; /* Yüksekliği sınırlayarak kaydırma çubuğu sağlar */
    overflow-y: auto;
    /* Ek: Daha iyi bir scrollbar deneyimi için */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #e9ecef;
}
.checklist-body::-webkit-scrollbar {
    width: 8px;
}
.checklist-body::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}
.checklist-body::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.checklist-set-group:not(:last-child) {
    margin-bottom: 2rem;
}
.checklist-set-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark-purple);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}
.checklist-card-grid {
    display: grid;
    grid-template-columns: 1fr; /* Her zaman tek sütun */
    gap: 1rem;
}

/* Checklist Kartı - GÜNCELLENMİŞ HALİ */
.checklist-card {
    display: flex;
    align-items: center; /* Öğeleri dikeyde ortala */
    gap: 1rem; /* Öğeler arası boşluk */
    padding: 0.75rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background-color: var(--light-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    opacity: 1;
    transform: scale(1);
    min-height: 80px; /* Minimum yükseklik kartların daha iyi görünmesini sağlar */
}
.checklist-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.checklist-card.selected {
    border-color: var(--primary-color);
    background-color: #f5f3f9;
}
.checklist-card.owned-in-checklist { /* Sahip olunan kartlar için */
    opacity: 0.8; /* Hafif soluk */
    pointer-events: none; /* Tıklanabilirliği kapat */
    background-color: #e6e6e6; /* Farklı bir arka plan rengi */
    border-color: #bbbbbb;
}
.checklist-card.owned-in-checklist .checkmark-overlay {
    background-color: var(--success-green); /* Yeşil tik */
}


.checklist-card .checkmark-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px; /* Daha büyük */
    height: 28px; /* Daha büyük */
    background-color: var(--primary-color);
    color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem; /* Tik boyutu */
    font-weight: 700;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2; /* Diğer elementlerin üzerinde olduğundan emin olun */
}
.checklist-card.selected .checkmark-overlay {
    transform: scale(1);
}

.card-thumbnail {
    width: 60px; /* Daha belirgin olması için genişletildi */
    height: 84px; /* Oranına göre ayarlandı (5/7) */
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0; /* Küçülmesini engelle */
    background-color: var(--secondary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Hafif gölge */
}
.card-details {
    flex-grow: 1; /* Kalan alanı kapla */
    display: flex;
    flex-direction: column; /* İsim ve nadirliği alt alta getir */
    justify-content: center; /* Dikeyde ortala */
}
.card-details .name {
    font-weight: 600;
    font-size: 1.05rem; /* Biraz daha büyük */
    color: var(--dark-color);
    white-space: nowrap; /* Tek satırda kalmasını sağla */
    overflow: hidden; /* Taşmayı gizle */
    text-overflow: ellipsis; /* Taşarsa üç nokta göster */
}
.card-details .rarity { /* Nadirlik noktası kaldırıldı, sadece metin için */
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 4px; /* İsimden boşluk bırak */
    /* Nadirlik noktası olmadığı için display:flex ve align-items:center gerekli değil ama bırakmanın zararı yok */
}


.condition-select {
    width: 80px; /* Select kutusunu daha dar yap */
    padding: 8px 5px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    background-color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none; /* Varsayılan ok simgesini kaldır */
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); /* Özel ok simgesi */
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}
.condition-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(112, 88, 152, 0.15);
}
.condition-select:disabled {
    background-color: #f1f3f5;
    color: #a0a0a0;
    cursor: not-allowed;
    border-color: #e0e0e0;
}


.checklist-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: #fafbff;
    display: flex;
    justify-content: flex-end;
}
.btn-add-selected {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-add-selected:hover {
    background-color: var(--primary-dark-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(112, 88, 152, 0.3);
}

/* --- Pagination Stilleri --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}
.pagination .page-item a {
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    background-color: var(--light-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    cursor: pointer;
}
.pagination .page-item a:hover {
    background-color: #f5f3f9;
    border-color: var(--primary-color);
}
.pagination .page-item.active a {
    background-color: var(--primary-color);
    color: var(--light-color);
    border-color: var(--primary-color);
    cursor: default;
}
.pagination .page-item.disabled a {
    color: #adb5bd;
    pointer-events: none;
    background-color: #e9ecef;
}

/* --- Modal Stilleri --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 53, 87, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--light-color);
    padding: 0;
    border-radius: 16px;
    text-align: left;
    max-width: 700px; /* Güncellendi: Daha geniş modal için */
    width: 90%;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
	pointer-events: auto;
}
.modal-overlay.visible .modal-content {
    transform: scale(1);
}
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h4 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--primary-dark-purple);
    font-weight: 700;
}
.modal-body {
    padding: 1.5rem;
}
.modal-body p {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
    text-align: center;
}
.modal-footer {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background-color: #fafbff;
    border-top: 1px solid var(--border-color);
}
.btn-modal {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}
.btn-confirm {
    background: var(--pokeball-red);
    color: #fff;
}
.btn-confirm:hover {
    filter: brightness(1.1);
    box-shadow: 0 5px 10px rgba(220, 53, 69, 0.3);
}
.btn-cancel {
    background: #e9ecef;
    color: var(--dark-color);
}
.btn-cancel:hover {
    background: #dee2e6;
}

/* --- Paylaşım Modalı Stilleri --- */
.share-modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}
.share-modal-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
.share-modal-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.share-tab-content {
    padding: 1.5rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.share-options, .expiry-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.share-options label, .expiry-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.share-options input:checked + label, .expiry-options input:checked + label {
    border-color: var(--primary-color);
    background-color: #f5f3f9;
}
.generated-link-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #e9ecef;
    border-radius: 8px;
}
.generated-link-container input {
    width: 100%;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 6px;
}
.active-shares-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}
.active-share-item {
    background: #fafbff;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.active-share-item p {
    margin: 0;
}
.active-share-item .link-url {
    font-family: monospace;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-all;
}


/* --- MODAL VE FORM STİLLERİ --- */

/* Modal Content'in içindeki layout */
.modal-layout {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.modal-card-preview {
    flex: 2; /* Kart önizlemesine daha fazla pay ver */
    max-width: 250px; /* Maksimum genişlik de belirleyebilirsiniz */
    text-align: center;
}

.modal-card-preview img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Oranlarını koruyarak sığdırır */
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: block;
    margin: 0 auto;
}

.modal-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-form-section h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark-purple);
    margin-bottom: 1.5rem;
}

#add-card-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

/* Form grupları (label ve input/select/toggle) */
.form-group {
    margin-bottom: 0;
}

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

.form-group-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(112, 88, 152, 0.15);
}

/* Toggle Switch Stilleri */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.toggle-group label:first-child {
    margin-bottom: 0;
    flex-shrink: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success-green);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--success-green);
}

input:checked + .slider:before {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
}

/* Grading Details alanı */
#grading-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Modal Aksiyon Butonları */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-actions button {
    flex: 1;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-actions .btn-confirm {
    background: var(--primary-color);
    color: var(--light-color);
}

.modal-actions .btn-confirm:hover {
    background-color: var(--primary-dark-purple);
    box-shadow: 0 5px 10px rgba(112, 88, 152, 0.3);
}

.modal-actions .btn-cancel {
    background: var(--border-color);
    color: var(--dark-color);
}

.modal-actions .btn-cancel:hover {
    background: #ced4da;
}


/* --------------------------------- */
/* Mobil Uyum (Responsive)           */
/* --------------------------------- */
@media (max-width: 1200px) {
    #card-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
@media (max-width: 900px) {
    .collection-container { flex-direction: column; align-items: stretch; }
    .side-menu { position: static; max-height: none; }
    #card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* Checklist için Mobil Uyum */
@media (max-width: 600px) {
    .checklist-card {
        flex-direction: column; /* Küçük ekranlarda alt alta */
        align-items: flex-start; /* Sola hizala */
        padding: 1rem;
        gap: 0.75rem;
    }
    .card-thumbnail {
        width: 80px; /* Mobil'de biraz daha büyük */
        height: 112px;
    }
    .card-details {
        align-items: flex-start; /* Metinleri sola hizala */
        text-align: left;
    }
    .condition-select {
        width: 100%; /* Mobil'de tam genişlik */
        max-width: 150px; /* Maksimum genişlik de belirleyebilirsiniz */
    }
    .checklist-card .checkmark-overlay {
        top: 15px; /* Konumu ayarla */
        right: 15px;
    }

    /* Modal için Mobil Uyum */
    .modal-content {
        max-width: 95%; /* Daha küçük ekranlarda daha fazla yer kapla */
        margin: 1rem; /* Kenarlardan boşluk bırak */
    }
    .modal-layout {
        flex-direction: column; /* Küçük ekranlarda kart ve formu alt alta getir */
        align-items: center; /* Ortala */
        padding: 1rem;
        gap: 1rem;
    }
    .modal-card-preview {
        flex: none; /* Flexbox özelliğini kapat */
        width: 80%; /* Mobil'de daha geniş görünebilir */
        max-width: 250px; /* Ama yine de belirli bir sınırı olsun */
    }
    .modal-form-section {
        width: 100%; /* Form tüm genişliği kapla */
    }
    .modal-form-section h4 {
        text-align: center; /* Başlığı ortala */
        margin-top: 1rem; /* Kart önizlemesinden sonra boşluk */
    }
    .modal-actions {
        flex-direction: column; /* Butonları alt alta sırala */
    }
}

@media (max-width: 450px) {
    #card-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
}

.active-shares-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}
.active-share-item {
    background: #fafbff;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    display: flex; /* İçindeki bilgileri ve butonu hizala */
    justify-content: space-between; /* Butonu sağa it */
    align-items: center; /* Dikeyde ortala */
}
.active-share-item .share-info { /* Link bilgilerini kapsayacak yeni bir div */
    flex-grow: 1;
}
.active-share-item p {
    margin: 0;
}
.active-share-item .link-url {
    font-family: monospace;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-all;
}

.btn-delete-share {
    background: none;
    border: none;
    color: var(--pokeball-red); /* Kırmızı çarpı */
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0; /* Küçülmesini engelle */
}
.btn-delete-share:hover {
    background-color: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}
.btn-delete-share svg {
    width: 20px;
    height: 20px;
}