/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Typography */
h1 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 300;
}

/* Header */
header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
}

.changelog-btn {
    padding: 0.6rem 1.2rem;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid #4CAF50;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
    position: absolute;
    right: 0;
    overflow: hidden;
}

.changelog-btn::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 ease;
}

.changelog-btn:hover {
    background: #45a049;
    border-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.25);
}

.changelog-btn:hover::before {
    left: 100%;
}

.changelog-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

/* Icon indicators for buttons */
.changelog-btn[href="changelog.html"]::after {
    content: '📋';
    font-size: 0.8rem;
}

.changelog-btn[href="index.html"]::after {
    content: '🔙';
    font-size: 0.8rem;
}

/* Dark mode enhancements */
.dark-mode .changelog-btn {
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.dark-mode .changelog-btn:hover {
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.35);
}

/* Focus states for accessibility */
.changelog-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

.dark-mode .changelog-btn:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.4);
}

/* Button entrance animation */
@keyframes buttonFadeIn {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.changelog-btn {
    animation: buttonFadeIn 0.5s ease-out;
}

/* Cookie Settings Button */
.cookie-settings-btn {
    position: fixed;
    top: 20px;
    right: 110px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
    transition: all 0.3s ease;
    z-index: 1000;
}

.cookie-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.35);
    background: linear-gradient(135deg, #45a049, #3e8e41);
}

.cookie-settings-btn:active {
    transform: translateY(0);
}

/* Admin Panel Button */
.admin-panel-btn {
    position: fixed;
    top: 20px;
    right: 170px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
    transition: all 0.3s ease;
    z-index: 1000;
}

.admin-panel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.35);
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.admin-panel-btn:active {
    transform: translateY(0);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 8px;
    width: 80px;
    height: 40px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1000;
}

.dark-mode-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.dark-mode-toggle:active {
    transform: translateY(0);
}

.toggle-text {
    transition: transform 0.3s ease;
    z-index: 2;
    position: relative;
    color: inherit;
}

.dark-mode-toggle.dark {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #e0e0e0;
}

/* Sunset Animation Overlay */
.dark-mode-toggle::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #ff6b6b, #ee5a24, #fd79a8, #6c5ce7);
    border-radius: 8px;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.dark-mode-toggle.transitioning::before {
    transform: translateY(-100%);
}

/* Logo */
.logo-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: 70px;
    height: 70px;
}

.logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4CAF50, #2196F3, #9C27B0, #FF9800);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 6px;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    z-index: 2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1;
    margin-bottom: 2px;
}

.logo-subtext {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

/* Shine Effect */
.logo::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: linear-gradient(
        135deg,
        transparent 30%,
        rgba(255, 255, 255, 0.2) 45%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.2) 55%,
        transparent 70%
    );
    border-radius: 50%;
    transform: translateX(-100%) translateY(-100%);
    animation: logoShine 4s ease-in-out infinite;
    z-index: 3;
}

@keyframes logoShine {
    0% {
        transform: translateX(-140%) translateY(-140%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    20% {
        transform: translateX(140%) translateY(140%);
        opacity: 1;
    }
    30% {
        opacity: 0;
    }
    100% {
        transform: translateX(140%) translateY(140%);
        opacity: 0;
    }
}

/* Dark Mode Variables */
:root {
    --bg-color: #f5f5f5;
    --container-bg: white;
    --text-color: #333;
    --border-color: #dee2e6;
    --filter-bg: #f8f9fa;
    --shadow: rgba(0,0,0,0.1);
    --table-hover: #f0f8ff;
    --table-stripe: #f9f9f9;
    --input-bg: white;
    --input-border: #ced4da;
    --button-bg: #007bff;
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --point-counter-bg: #e8f5e8;
    --point-counter-border: #4CAF50;
    --card-name-color: #333;
}

html.dark-mode body {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --border-color: #404040;
    --filter-bg: #3a3a3a;
    --shadow: rgba(0,0,0,0.3);
    --table-hover: #3a3a3a;
    --table-stripe: #353535;
    --input-bg: #404040;
    --input-border: #555555;
    --button-bg: #0d6efd;
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --point-counter-bg: #2a4a2a;
    --point-counter-border: #5cb85c;
    --card-name-color: #e0e0e0;
}

/* Dark mode logo adjustments */
html.dark-mode body .logo {
    background: linear-gradient(135deg, #2c5530, #1565c0, #6a1b9a, #e65100);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Apply CSS Variables */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    background-color: var(--container-bg);
    box-shadow: 0 2px 10px var(--shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

h1 {
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* Global Input Styles for Dark Mode */
input, select, textarea {
    background-color: var(--input-bg);
    color: var(--text-color);
    border-color: var(--input-border);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

input::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}

/* Labels and Text */
label, .search-box label, .point-input label, .point-budget label {
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* Bold text elements */
.results-count, .counter-display, .point-budget label, .individual-points, .total-points {
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* Filter Section */
.filter-container {
    background-color: var(--filter-bg);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.search-box {
    margin-bottom: 20px;
    position: relative;
}

.search-box label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.search-box input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.search-box input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.search-box input.searching {
    border-color: #4CAF50;
    box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.2);
}

.search-box::after {
    content: '🔍';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    transition: opacity 0.2s ease;
    pointer-events: none;
    font-size: 14px;
}

.search-box input:focus + .search-box::after,
.search-box input:not(:placeholder-shown) + .search-box::after {
    opacity: 0.7;
}

.point-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.point-input {
    flex: 1;
    min-width: 150px;
}

.point-input label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.point-input input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.point-input input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.results-info span {
    font-weight: bold;
    font-size: 14px;
    transition: color 0.15s ease;
    position: relative;
}

.results-info span.updating {
    color: #4CAF50;
}

.results-info span.updated {
    animation: resultsPulse 0.3s ease-out;
}

@keyframes resultsPulse {
    0% {
        color: var(--text-color);
    }
    50% {
        color: #4CAF50;
    }
    100% {
        color: var(--text-color);
    }
}

.clear-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background-color: #d32f2f;
    transform: translateY(-1px);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    table-layout: fixed; /* Enable fixed layout for better column control */
}

/* Column width optimization */
th:nth-child(1), td:nth-child(1) { /* Card Name */
    width: 60%;
    min-width: 200px;
    max-width: 400px;
    text-align: left !important; /* Force left alignment */
}

th:nth-child(2), td:nth-child(2) { /* Points */
    width: 25%;
    min-width: 80px;
    text-align: center;
}

th:nth-child(3), td:nth-child(3) { /* Actions */
    width: 15%;
    min-width: 80px;
    text-align: center;
}

.table-loading {
    position: relative;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
    animation: tableLoading 0.8s ease-in-out;
    z-index: 10;
}

@keyframes tableLoading {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

th, td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    transition: color 0.3s ease, border-color 0.3s ease;
    vertical-align: middle; /* Ensure consistent vertical alignment */
}

th {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    user-select: none;
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

th:hover {
    background-color: #45a049;
}

th::after {
    content: " ↕";
    opacity: 0.5;
    float: right;
    transition: opacity 0.3s ease;
}

th.sort-asc::after {
    content: " ↑";
    opacity: 1;
}

th.sort-desc::after {
    content: " ↓";
    opacity: 1;
}

tbody tr {
    transition: all 0.2s ease;
    opacity: 1;
    transform: translateY(0);
    cursor: pointer;
    user-select: none;
}

tbody tr:nth-child(even) {
    background-color: var(--table-stripe);
    transition: background-color 0.3s ease;
}

tbody tr:hover {
    background-color: var(--table-hover);
    transform: translateX(2px);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

tbody tr.fade-out {
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
}

tbody tr.fade-in {
    animation: fadeInRow 0.25s ease-out forwards;
}

@keyframes fadeInRow {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Minimal staggered animation for first few rows only */
tbody tr.fade-in:nth-child(1) { animation-delay: 0ms; }
tbody tr.fade-in:nth-child(2) { animation-delay: 20ms; }
tbody tr.fade-in:nth-child(3) { animation-delay: 40ms; }
tbody tr.fade-in:nth-child(4) { animation-delay: 60ms; }
tbody tr.fade-in:nth-child(5) { animation-delay: 80ms; }

.card-name {
    font-weight: 500;
    color: var(--card-name-color);
    transition: color 0.3s ease;
    position: relative;
    max-width: 100%;
    text-align: left; /* Ensure left alignment */
}

.card-name > div {
    display: flex;
    align-items: center;
    max-width: 100%;
    gap: 6px;
    justify-content: flex-start; /* Force left alignment */
}

.card-name .preview-icon {
    flex-shrink: 0;
    order: -1;
}

.card-name span:first-of-type {
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 40px;
    white-space: nowrap;
    min-width: 0;
    text-align: left; /* Ensure text is left-aligned */
}

/* Magnifying glass icon for enhanced cards */
.preview-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 0; /* Remove margin since we use gap now */
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.2s ease;
    user-select: none;
    flex-shrink: 0; /* Prevent shrinking */
}

.preview-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.preview-icon::before {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.points {
    text-align: center;
    font-weight: bold;
    color: #2E7D32;
    font-size: 16px;
}

/* Group Separator */
.group-separator {
    border: none !important;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent) !important;
    height: 2px !important;
    padding: 0 !important;
}

.group-separator td {
    padding: 0 !important;
    border: none !important;
    height: 2px !important;
    background: transparent !important;
}

/* Status Messages */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

.error {
    color: #d32f2f;
    text-align: center;
    padding: 20px;
    background-color: #ffebee;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #f44336;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .point-filters {
        flex-direction: column;
    }
    
    .results-info {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .card-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 5px;
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .filter-container {
        padding: 15px;
    }
    
    .search-box input,
    .point-input input {
        padding: 10px;
        font-size: 14px;
    }
}

/* Point Counter Section */
.point-counter-section {
    margin: 20px 0;
}

.point-counter-container {
    background-color: var(--point-counter-bg);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--point-counter-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.point-budget {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.point-budget label {
    font-weight: bold;
    white-space: nowrap;
}

.point-budget input {
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    width: 80px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.point-budget input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.point-display {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: flex-end;
    min-width: 200px;
}

.counter-display {
    font-size: 18px;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: white;
    border: 2px solid #4CAF50;
}

.counter-display.within-budget {
    color: #2E7D32;
    border-color: #4CAF50;
    background-color: #f1f8e9;
}

.counter-display.over-budget {
    color: #d32f2f;
    border-color: #f44336;
    background-color: #ffebee;
    animation: overBudgetPulse 0.5s ease-out;
}

@keyframes overBudgetPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.current-points {
    font-weight: 900;
}

.clear-selection-btn {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.clear-selection-btn:hover {
    background-color: #f57c00;
}

.clear-selection-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* History Actions */
.counter-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.history-actions {
    display: flex;
    gap: 8px;
}

.history-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.history-btn:hover:not(:disabled) {
    background-color: #1976D2;
    transform: translateY(-1px);
}

.history-btn:disabled {
    background-color: #bdbdbd;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.undo-btn {
    background-color: #9C27B0;
}

.undo-btn:hover:not(:disabled) {
    background-color: #7B1FA2;
}

.redo-btn {
    background-color: #FF5722;
}

.redo-btn:hover:not(:disabled) {
    background-color: #E64A19;
}

/* Selected Row Styles */
tbody tr.selected {
    background-color: #e8f5e8 !important;
    border-left: 4px solid #4CAF50;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

tbody tr.selected .card-name {
    color: #2E7D32;
    font-weight: 600;
}

tbody tr.selected .points {
    color: #2E7D32;
    font-size: 17px;
}

/* Responsive Point Counter */
@media (max-width: 768px) {
    .point-counter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .point-display {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }
    
    .counter-display {
        text-align: center;
    }
}

/* Copy Count and Action Styles */
.name-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-count {
    font-weight: bold;
    color: #2E7D32;
    font-size: 14px;
}

.total-points {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.individual-points {
    font-weight: bold;
}

.action-header {
    width: 80px;
    text-align: center;
    cursor: default !important;
}

.action-header:hover {
    background-color: #4CAF50 !important;
}

.action-cell {
    width: 80px;
    text-align: center;
    padding: 8px;
    min-width: 80px;
}

.remove-copy-btn {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.remove-copy-btn:hover {
    background-color: #d32f2f;
    transform: scale(1.1);
}

.remove-copy-btn:active {
    transform: scale(0.95);
}

/* Max Copies Error */
.max-copies-error {
    background-color: #ffebee;
    color: #d32f2f;
    padding: 12px 20px;
    border-radius: 6px;
    border-left: 4px solid #f44336;
    margin: 10px 0;
    font-weight: bold;
    text-align: center;
    animation: slideInError 0.3s ease-out;
}

.max-copies-error.fade-out {
    animation: slideOutError 0.3s ease-in forwards;
}

@keyframes slideInError {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutError {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-20px);
        opacity: 0;
    }
}

/* Responsive adjustments for new column */
@media (max-width: 768px) {
    .action-cell {
        width: 60px;
        padding: 6px;
    }
    
    .remove-copy-btn {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
    
    .copy-count {
        font-size: 12px;
    }
    
    .total-points {
        font-size: 10px;
    }
}

/* Card Preview Tooltip */
.card-preview {
    position: absolute;
    background: var(--container-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 16px;
    max-width: 400px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    font-size: 14px;
    line-height: 1.4;
}

.card-preview.show {
    opacity: 1;
    transform: translateY(0);
}

.card-preview-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-preview-image {
    width: 60px;
    height: 87px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.card-preview-info {
    flex: 1;
    min-width: 0;
}

.card-preview-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 4px;
    word-break: break-word;
}

.card-preview-type {
    color: var(--card-name-color);
    font-size: 12px;
    margin-bottom: 8px;
    font-style: italic;
}

.card-preview-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
}

.card-preview-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.card-preview-stat-label {
    font-size: 10px;
    opacity: 0.7;
    text-transform: uppercase;
}

.card-preview-stat-value {
    font-size: 14px;
}

.card-preview-description {
    color: var(--text-color);
    margin-bottom: 12px;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
}

.card-preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
}

.card-preview-genesys {
    font-weight: 700;
    color: #4CAF50;
}

.card-preview-ban {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.card-preview-ban.forbidden {
    background: #f44336;
    color: white;
}

.card-preview-ban.limited {
    background: #ff9800;
    color: white;
}

.card-preview-ban.semi-limited {
    background: #ffc107;
    color: black;
}

/* Full-Screen Card Overlay */
.card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.card-overlay.show {
    opacity: 1;
    visibility: visible;
}

.card-overlay-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-overlay-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.card-overlay-close {
    position: absolute;
    top: -60px;
    right: -60px;
    width: auto;
    height: auto;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    z-index: 10001;
}

.card-overlay-close:hover {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.card-overlay-close::before {
    content: '×';
}

/* Responsive design for header content */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
        margin-bottom: 0;
    }
    
    .changelog-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.9rem;
        position: static;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .changelog-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        position: static;
    }
}

/* Mobile Header Bar */
.mobile-header {
    display: none; /* Hidden by default, shown only on mobile */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--container-bg);
    border-bottom: 2px solid var(--border-color);
    z-index: 2000;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px var(--shadow);
    gap: 10px;
}

.mobile-logo {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
}

.mobile-logo-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #2196F3, #9C27B0, #FF9800);
    object-fit: cover;
}

.mobile-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    flex-grow: 1;
    text-align: center;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-changelog-btn {
    background: #4CAF50;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.mobile-changelog-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.mobile-admin-panel-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.mobile-admin-panel-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.mobile-dark-mode-toggle {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.mobile-dark-mode-toggle:hover {
    transform: translateY(-1px);
}

.mobile-dark-mode-toggle.dark {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.mobile-toggle-text {
    color: inherit;
}

.mobile-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Show mobile header only on mobile devices */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    /* Hide desktop logo and buttons on mobile */
    .logo-container,
    .dark-mode-toggle,
    .cookie-settings-btn,
    .admin-panel-btn {
        display: none !important;
    }
    
    /* Hide header content div on mobile for index.html only */
    .index-page .header-content {
        display: none !important;
    }
    
    /* Add top padding to body to prevent content from being hidden under mobile header */
    body {
        padding-top: 80px;
    }
    
    .container {
        margin-top: 0;
    }
}

/* GDPR Cookie Consent Popup */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 3px solid #4CAF50;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 70vh;
    overflow-y: auto;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-consent-header h3 {
    margin: 0 0 15px 0;
    color: var(--text-color);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-consent-body p {
    margin: 0 0 20px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.cookie-categories {
    margin: 20px 0;
}

.cookie-category {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.cookie-category-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4CAF50;
}

.cookie-category-header label {
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

.cookie-category-header input[type="checkbox"]:disabled + label {
    cursor: default;
}

.cookie-category-description {
    margin: 0;
    padding-left: 28px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0 15px 0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.cookie-btn-primary {
    background: #4CAF50;
    color: white;
}

.cookie-btn-primary:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: transparent;
    color: #333333;
    border: 2px solid #dee2e6;
}

.cookie-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #4CAF50;
}

.cookie-consent-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.cookie-consent-footer p {
    margin: 0;
    text-align: center;
}

.cookie-consent-footer a {
    color: #4CAF50;
    text-decoration: none;
}

.cookie-consent-footer a:hover {
    text-decoration: underline;
}

/* Cookie Settings Panel */
.cookie-settings {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-settings.show {
    display: flex;
}

.cookie-settings-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.cookie-settings-header h3 {
    margin: 0;
    color: #333333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666666;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
}

.cookie-settings-body {
    padding: 0 20px;
}

.cookie-settings-actions {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 15px;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        min-width: auto;
        width: 100%;
    }
    
    .cookie-settings {
        padding: 10px;
    }
    
    .cookie-settings-content {
        max-height: 90vh;
    }
    
    .cookie-category-description {
        padding-left: 0;
        margin-top: 8px;
    }
}

/* Dark Mode Support */
.dark-mode .cookie-consent {
    background: #2d3748;
    border-top-color: #4CAF50;
    color: #e2e8f0;
}

.dark-mode .cookie-consent-header h3 {
    color: #e2e8f0;
}

.dark-mode .cookie-consent-body p {
    color: #cbd5e0;
}

.dark-mode .cookie-category {
    background: #4a5568;
    border-color: #718096;
}

.dark-mode .cookie-category-header label {
    color: #e2e8f0;
}

.dark-mode .cookie-category-description {
    color: #cbd5e0;
}

.dark-mode .cookie-btn-secondary {
    color: #e2e8f0;
    border-color: #718096;
}

.dark-mode .cookie-btn-secondary:hover {
    background: #4a5568;
    border-color: #4CAF50;
}

.dark-mode .cookie-consent-footer {
    border-top-color: #718096;
}

.dark-mode .cookie-settings-content {
    background: #2d3748;
    color: #e2e8f0;
}

.dark-mode .cookie-settings-header {
    border-bottom-color: #718096;
}

.dark-mode .cookie-settings-header h3 {
    color: #e2e8f0;
}

.dark-mode .close-btn {
    color: #cbd5e0;
}

.dark-mode .close-btn:hover {
    background: #4a5568;
}

.dark-mode .cookie-settings-actions {
    border-top-color: #718096;
}

/* Website Counter */
.website-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1500;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    color: #00ff00;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.website-counter:hover {
    opacity: 1;
}

/* Ensure counter is visible in dark mode */
.dark-mode .website-counter {
    background: rgba(0, 0, 0, 0.9);
    color: #00ff41;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .website-counter:hover {
    opacity: 1;
}

/* Counter animation styles */
.counter-number {
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    color: inherit;
    margin: 0;
    padding: 0;
}

.counter-number.updating {
    transform: scale(1.05);
}

/* Mobile adjustments for counter */
@media (max-width: 768px) {
    .website-counter {
        bottom: 80px; /* Move up to avoid mobile UI elements */
        left: 10px;
        transform: scale(0.9); /* Slightly smaller on mobile */
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-3px);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

.scroll-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Dark mode scroll button */
html.dark-mode .scroll-to-top {
    background: linear-gradient(135deg, #5cb85c, #4CAF50);
}

html.dark-mode .scroll-to-top:hover {
    background: linear-gradient(135deg, #4CAF50, #5cb85c);
}

/* Mobile adjustments for scroll button */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}



