/* Styles for Collection Management Page */

.collection-filters {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.search-filter {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-filter input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 14px;
}

.search-filter i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 14px;
    min-width: 150px;
}

/* Collection Statistics */
.collection-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.3), rgba(138, 43, 226, 0.3));
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Collection Table */
.collection-table-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.collection-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #fff;
}

.collection-table th {
    text-align: left;
    padding: 15px 10px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-size: 12px;
}

.collection-table td {
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.collection-table tbody tr {
    transition: background 0.3s ease;
}

.collection-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.card-image {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Empty Collection State */
.empty-collection td {
    padding: 50px 20px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state i {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state p {
    margin-bottom: 10px;
    font-size: 18px;
}

.empty-subtext {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

/* Add Card Button */
.add-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #FFA500, #feb47b);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.4);
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.items-per-page select {
    padding: 5px 10px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
}

.pagination {
    display: flex;
    gap: 5px;
}

.pagination button {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pagination button:hover,
.pagination button.active {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal-content {
    background-color: #1a1a2e;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
}

.modal-title {
    font-weight: 600;
}

.close {
    color: rgba(255, 255, 255, 0.5);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 5px;
    padding: 10px 15px;
}

.custom-file-input,
.custom-file-label {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.custom-file-label::after {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.format-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

.format-info h6 {
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.8);
}

.format-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.download-template {
    color: #4e95ff;
    text-decoration: underline;
    font-size: 14px;
}

.download-template:hover {
    text-decoration: none;
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border-radius: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-top: 5px;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.card-result-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-result-image {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: cover;
}

.card-result-details {
    flex: 1;
}

.card-result-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.card-result-set {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.no-results {
    padding: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.selected-card-info {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    gap: 15px;
}

.selected-card-image {
    width: 80px;
    height: 112px;
    border-radius: 4px;
    object-fit: cover;
}

.selected-card-text h4 {
    margin-bottom: 5px;
    font-size: 18px;
}

.selected-card-text p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #FFA500;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Import Tabs */
.import-tabs .nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.import-tabs .nav-link {
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 20px;
}

.import-tabs .nav-link.active {
    color: #fff;
    background: transparent;
    border-bottom: 3px solid #FFA500;
}

.import-tabs .tab-content {
    padding-top: 20px;
}

.import-info {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .collection-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .collection-table-container {
        padding: 10px;
    }
    
    .collection-table th, 
    .collection-table td {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
    }
}
