:root {
    --common-color: #b0b0b0;
    --uncommon-color: #27ae60;
    --rare-color: #3498db;
    --epic-color: #9b59b6;
    --legendary-color: #f39c12;
    --used-color: #555;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #1a1a2e;
    color: #fff;
    padding: 20px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Header and Language Switcher */
header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.language-switcher {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
}

.language-switcher:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.empty-language-switcher,
.error-language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    z-index: 10;
}

.empty-language-switcher:hover,
.error-language-switcher:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}



h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #3498db, #9b59b6, #f39c12);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 3s infinite;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Collection View */
.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: #16213e;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 100px;
    border: 2px solid transparent;
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.filter-btn.active {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: currentColor;
}

.common.active {
    background-color: var(--common-color);
    color: #000;
}

.uncommon.active {
    background-color: var(--uncommon-color);
}

.rare.active {
    background-color: var(--rare-color);
}

.epic.active {
    background-color: var(--epic-color);
}

.legendary.active {
    background-color: var(--legendary-color);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

.card {
    height: 380px;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
}

.card.used {
    opacity: 0.7;
    filter: grayscale(0.8);
}

.card.new::after {
    content: "NEW";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4757;
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 10;
    animation: pulse 1.5s infinite;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    border-radius: 15px;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
}

.card-back {
    transform: rotateY(180deg);
    padding: 20px;
    background: #16213e;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-image {
    width: 100%;
    height: 65%;
    object-fit: cover;
}

.card-details {
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    height: 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-name {
    font-size: 1.2rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-description {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

.card-rarity {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.5);
}

/* Rarity-specific styles */
.common .card-rarity {
    background: rgba(176, 176, 176, 0.8);
}

.uncommon .card-rarity {
    background: rgba(39, 174, 96, 0.8);
}

.rare .card-rarity {
    background: rgba(52, 152, 219, 0.8);
}

.epic .card-rarity {
    background: rgba(155, 89, 182, 0.8);
}

.legendary .card-rarity {
    background: rgba(243, 156, 18, 0.8);
}

/* Animation classes */
.common .card-inner {
    transition: transform 0.6s;
}

.uncommon .card-inner {
    transition: transform 0.6s;
}

.uncommon .card-front::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(45deg, var(--uncommon-color), transparent, var(--uncommon-color));
    border-radius: 16px;
    animation: border-pulse 3s infinite;
}

.rare .card-inner {
    transition: transform 0.6s;
}

.rare .card-front::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(45deg, var(--rare-color), transparent, var(--rare-color));
    border-radius: 16px;
    animation: border-pulse 2s infinite;
}

.epic .card-inner {
    transition: transform 0.6s;
}

.epic .card-front::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(45deg, var(--epic-color), transparent, #ff00cc, transparent, var(--epic-color));
    background-size: 400% 400%;
    border-radius: 16px;
    animation: gradient-shift 3s ease infinite, border-pulse 3s infinite;
}

.legendary .card-inner {
    transition: transform 0.6s;
}

.legendary .card-front::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(45deg, var(--legendary-color), #ff0000, #ffff00, var(--legendary-color));
    background-size: 400% 400%;
    border-radius: 16px;
    animation: gradient-shift 3s ease infinite, border-pulse 1.5s infinite;
}

.legendary .card-inner:hover {
    animation: float 3s ease-in-out infinite;
}

/* Particle canvas for rare cards */
.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    border-radius: 15px;
}

/* Detail View */
.detail-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 10px;
}

.detail-card {
    height: 450px;
    perspective: 1000px;
    margin: 0 auto 30px;
    max-width: 320px;
}

.detail-content {
    background: #16213e;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
}

.detail-description {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.detail-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-rarity {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
}

.detail-status {
    padding: 8px 16px;
    border-radius: 20px;
    background: #333;
}

.btn-back {
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-use {
    padding: 12px 24px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-use:hover:not(:disabled) {
    background: #219652;
    transform: translateY(-2px);
}

.btn-use:disabled {
    background: var(--used-color);
    cursor: not-allowed;
    transform: none;
}

/* Collection Animation Overlay */
.animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    flex-direction: column;
    padding: 20px;
}

.animation-card {
    width: 350px;
    height: 490px;
    position: relative;
    transform-style: preserve-3d;
    animation: cardReveal 2s forwards;
    max-width: 90%;
}

.animation-content {
    text-align: center;
    margin-top: 30px;
}

/* Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: #16213e;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-confirm {
    background: #27ae60;
    color: white;
}

.btn-confirm:hover {
    background: #219652;
    transform: translateY(-2px);
}

.btn-cancel {
    background: #e74c3c;
    color: white;
}

.btn-cancel:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Usage Animation */
.usage-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
}

/* Keyframes for animations */
@keyframes border-pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotateY(180deg);
    }

    50% {
        transform: translateY(-10px) rotateY(180deg);
    }

    100% {
        transform: translateY(0) rotateY(180deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes cardReveal {
    0% {
        transform: scale(0.1) rotate(0deg);
        opacity: 0;
    }

    70% {
        transform: scale(1.2) rotate(5deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 10px currentColor;
    }

    50% {
        box-shadow: 0 0 40px currentColor;
    }

    100% {
        box-shadow: 0 0 10px currentColor;
    }
}


/* Touch device improvements */
@media (hover: none) {
    .card:hover .card-inner {
        transform: none;
    }

    .card:active .card-inner {
        transform: rotateY(180deg);
    }

    .filter-btn:hover {
        transform: none;
    }

    .filter-btn:active {
        transform: translateY(-3px);
    }
}




.empty-state-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.empty-state-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.empty-state-animation {
    position: relative;
    height: 200px;
    margin-bottom: 40px;
}

.floating-card {
    position: absolute;
    width: 120px;
    height: 160px;
    perspective: 1000px;
}

.floating-card .card-shape {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.floating-card .card-inner-shape {
    width: 80%;
    height: 80%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.question-mark {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
}

/* Floating animations */
#floating-card-1 {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: float-main 4s ease-in-out infinite;
}

#floating-card-2 {
    top: 40px;
    left: 30%;
    animation: float-secondary 5s ease-in-out infinite 1s;
}

#floating-card-3 {
    top: 60px;
    right: 30%;
    animation: float-tertiary 6s ease-in-out infinite 0.5s;
}

@keyframes float-main {

    0%,
    100% {
        transform: translateX(-50%) translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateX(-50%) translateY(-20px) rotate(5deg);
    }
}

@keyframes float-secondary {

    0%,
    100% {
        transform: translateY(0px) rotate(-5deg);
    }

    50% {
        transform: translateY(-15px) rotate(0deg);
    }
}

@keyframes float-tertiary {

    0%,
    100% {
        transform: translateY(0px) rotate(3deg);
    }

    50% {
        transform: translateY(-25px) rotate(-2deg);
    }
}

.empty-state-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #3498db, #9b59b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 3s infinite;
}

.empty-state-content p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 30px;
    line-height: 1.6;
}

.empty-state-actions {
    margin-top: 30px;
}

.btn-refresh {
    padding: 15px 30px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-refresh:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(45deg, #2980b9, #3498db);
}

/* Pulsing effect for cards */
.floating-card .card-shape {
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 12px 40px rgba(52, 152, 219, 0.2);
    }
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    flex-direction: column;
}

.loading-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
}

.loading-card {
    position: absolute;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.loading-card .card-shape {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3) 0%, rgba(155, 89, 182, 0.3) 100%);
    border-radius: 15px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: loading-rotate 3s ease-in-out infinite;
}

.loading-card .card-inner-shape {
    width: 70%;
    height: 70%;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-sparkle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
}

.loading-sparkle:nth-child(1) {
    top: 10px;
    left: 10px;
    animation-delay: 0s;
}

.loading-sparkle:nth-child(2) {
    top: 10px;
    right: 10px;
    animation-delay: 0.5s;
}

.loading-sparkle:nth-child(3) {
    bottom: 10px;
    left: 10px;
    animation-delay: 1s;
}

.loading-sparkle:nth-child(4) {
    bottom: 10px;
    right: 10px;
    animation-delay: 1.5s;
}

.loading-text {
    text-align: center;
    margin-top: 20px;
}

.loading-text h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #3498db, #9b59b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 3s infinite;
}

.loading-text p {
    font-size: 1rem;
    opacity: 0.8;
}

@keyframes loading-rotate {
    0% {
        transform: rotateY(0deg) scale(1);
    }
    25% {
        transform: rotateY(90deg) scale(1.05);
    }
    50% {
        transform: rotateY(180deg) scale(1);
    }
    75% {
        transform: rotateY(270deg) scale(1.05);
    }
    100% {
        transform: rotateY(360deg) scale(1);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Error State Styles */
.error-state-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.error-state-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.error-state-animation {
    position: relative;
    height: 200px;
    margin-bottom: 40px;
}

.error-card {
    position: absolute;
    width: 100px;
    height: 140px;
    perspective: 1000px;
}

.error-card .error-shape {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid rgba(231, 76, 60, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 32px rgba(231, 76, 60, 0.2);
}

.error-card .card-inner-shape {
    width: 80%;
    height: 80%;
    border: 2px dashed rgba(231, 76, 60, 0.4);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-icon {
    font-size: 2rem;
    animation: error-pulse 2s ease-in-out infinite;
}

.error-orb {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.6);
    animation: error-float 4s ease-in-out infinite;
}

#error-orb-1 {
    top: 30px;
    left: 25%;
    animation-delay: 0s;
}

#error-orb-2 {
    top: 80px;
    right: 25%;
    animation-delay: 1.3s;
}

#error-orb-3 {
    bottom: 40px;
    left: 45%;
    animation-delay: 2.6s;
}

/* Error card animations */
#error-card-1 {
    top: 20px;
    left: 20%;
    animation: error-shake 3s ease-in-out infinite;
}

#error-card-2 {
    top: 50px;
    right: 20%;
    animation: error-shake 3.5s ease-in-out infinite 0.5s;
}

#error-card-3 {
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: error-shake 4s ease-in-out infinite 1s;
}

.error-state-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 3s infinite;
}

.error-state-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #ffcccc;
}

.error-state-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-retry {
    padding: 12px 24px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-retry:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-support {
    padding: 12px 24px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-support:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.empty-state-container,
.error-state-container {
    position: relative;
    width: 100%;
}


/* Admin Views */
.admin-view {
    display: none;
}

.admin-view.active {
    display: block;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-login-form {
    max-width: 500px;
    margin: 40px auto;
    background: #16213e;
    padding: 30px;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #fff;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #3498db;
    border-radius: 8px;
    background: #1a1a2e;
    color: #fff;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.admin-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-admin-login,
.btn-back-to-user,
.btn-refresh-users,
.btn-admin-logout,
.btn-add-card,
.btn-save-user,
.btn-back-to-dashboard {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-admin-login {
    background: #27ae60;
    color: white;
}

.btn-admin-login:hover {
    background: #219652;
}

.btn-back-to-user {
    background: #3498db;
    color: white;
}

.btn-back-to-user:hover {
    background: #2980b9;
}

.btn-refresh-users {
    background: #3498db;
    color: white;
}

.btn-refresh-users:hover {
    background: #2980b9;
}

.btn-admin-logout {
    background: #e74c3c;
    color: white;
}

.btn-admin-logout:hover {
    background: #c0392b;
}

.btn-add-card {
    background: #9b59b6;
    color: white;
}

.btn-add-card:hover {
    background: #8e44ad;
}

.btn-save-user {
    background: #27ae60;
    color: white;
}

.btn-save-user:hover {
    background: #219652;
}

.btn-back-to-dashboard {
    background: #3498db;
    color: white;
}

.btn-back-to-dashboard:hover {
    background: #2980b9;
}

.admin-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.search-container {
    flex: 1;
    min-width: 300px;
}

.search-container input {
    width: 100%;
    padding: 12px;
    border: 2px solid #3498db;
    border-radius: 8px;
    background: #16213e;
    color: #fff;
    font-size: 1rem;
}

.users-list {
    display: grid;
    gap: 15px;
}

.user-item {
    display: flex;
    justify-content: between;
    align-items: center;
    background: #16213e;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.user-info {
    flex: 1;
}

.user-id {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.user-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.card-count {
    color: #3498db;
}

.annotation {
    color: #27ae60;
}

.isAdmin {
    color: #f39c12;
}

.btn-manage-user {
    padding: 8px 16px;
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-manage-user:hover {
    background: #e67e22;
}

.admin-user-content {
    background: #16213e;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}

.admin-section {
    margin-bottom: 30px;
}

.admin-section h3 {
    margin-bottom: 15px;
    color: #3498db;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.skill-cards-list {
    margin-bottom: 20px;
}

.admin-card-item {
    display: flex;
    justify-content: between;
    align-items: center;
    background: #1a1a2e;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid;
}

.admin-card-item.common {
    border-left-color: var(--common-color);
}

.admin-card-item.uncommon {
    border-left-color: var(--uncommon-color);
}

.admin-card-item.rare {
    border-left-color: var(--rare-color);
}

.admin-card-item.epic {
    border-left-color: var(--epic-color);
}

.admin-card-item.legendary {
    border-left-color: var(--legendary-color);
}

.admin-card-info {
    flex: 1;
}

.admin-card-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.admin-card-details {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.admin-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.card-status-select {
    padding: 6px 10px;
    border: 1px solid #3498db;
    border-radius: 4px;
    background: #16213e;
    color: #fff;
}

.btn-remove-session,
.btn-remove-card {
    padding: 6px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-remove-session:hover,
.btn-remove-card:hover {
    background: #c0392b;
}

.no-users,
.no-cards {
    text-align: center;
    padding: 40px;
    opacity: 0.7;
    font-style: italic;
}

.admin-modal {
    max-width: 600px;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid #3498db;
    margin-bottom: 20px;
}

.modal-tab {
    flex: 1;
    padding: 12px;
    background: #16213e;
    border: none;
    border-bottom: 3px solid transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-tab.active {
    border-bottom-color: #3498db;
    background: #1a1a2e;
}

.modal-tab:hover:not(.active) {
    background: #1a1a2e;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Config specific styles */
.admin-config-view .admin-card-item {
    border-left: 4px solid #9b59b6;
}

.btn-manage-config {
    padding: 12px 24px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-manage-config:hover {
    background: #8e44ad;
}

/* Card ID in config view */
.admin-card-id {
    color: #bdc3c7;
    font-size: 0.8rem;
}

.btn-copy-card {
    padding: 6px 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-copy-card:hover {
    background: #2980b9;
}

/* Update admin card actions to handle the new button */
.admin-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Admin Session Controls Refactor Styles */
.admin-session-controls {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-session-controls .control-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-session-controls label {
    font-size: 0.9rem;
    color: var(--common-color);
    font-weight: 600;
}

.admin-select {
    background: #2a2a40;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.admin-select:focus {
    outline: none;
    border-color: var(--rare-color);
}

#btn-load-users {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--rare-color), #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 48px; /* Match height of select box */
}

#btn-load-users:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

#btn-load-users:active {
    transform: translateY(0);
}

/* Prompt text for empty state */
.prompt-text {
    text-align: center;
    padding: 40px;
    color: var(--common-color);
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

/* Enhanced Search Input */
.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

#user-search {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
}

#user-search:focus {
    outline: none;
    border-color: var(--rare-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

/* Button Styling Overhaul */
.btn-icon-text {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s active, background 0.2s;
    border: none;
}

.btn-icon-text.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-icon-text.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-icon-text.danger {
    background: rgba(231, 76, 60, 0.2);
    color: #ff7675;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.btn-icon-text.danger:hover {
    background: #e74c3c;
    color: white;
}

#admin-org-info {
    padding-bottom: 20px;
}

.skip-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  z-index: 1000;
  transition: background-color 0.2s, transform 0.1s;
}

.skip-btn:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.skip-btn:active {
  transform: scale(0.95);
}

.skip-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile Responsiveness for controls */
@media (max-width: 600px) {
    .admin-session-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    #btn-load-users {
        width: 100%;
    }
}

/* Responsive adjustments for admin card actions */
@media (max-width: 768px) {
    .admin-card-actions {
        justify-content: flex-start;
        width: 100%;
    }
    
    .btn-remove-session,
    .btn-copy-card,
    .btn-remove-card {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .admin-card-actions {
        flex-direction: column;
    }
    
    .btn-remove-session,
    .btn-copy-card,
    .btn-remove-card {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .admin-container {
        padding: 15px;
    }
    
    .admin-login-form {
        margin: 20px auto;
        padding: 20px;
    }
    
    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-card-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-card-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .admin-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions button {
        width: 100%;
    }
}

/* Error animations */
@keyframes error-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes error-shake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-5px) rotate(-2deg);
    }
    75% {
        transform: translateX(5px) rotate(2deg);
    }
}

@keyframes error-float {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

/* Pulsing effect for error cards */
.error-card .error-shape {
    animation: error-glow 3s ease-in-out infinite;
}

@keyframes error-glow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(231, 76, 60, 0.2);
        border-color: rgba(231, 76, 60, 0.4);
    }
    50% {
        box-shadow: 0 12px 40px rgba(231, 76, 60, 0.4);
        border-color: rgba(231, 76, 60, 0.7);
    }
}


/* Responsive adjustments */
@media (max-width: 1024px) {
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 5px;
    }

    .subtitle {
        font-size: 1rem;
    }

    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }

    .card {
        height: 350px;
    }

    .card-name {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: 0.85rem;
    }

    .controls {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-width: 90px;
    }

    .detail-card {
        height: 400px;
        max-width: 280px;
    }

    .animation-card {
        width: 280px;
        height: 392px;
    }

    .modal {
        padding: 20px;
    }

    .modal-btn {
        padding: 10px 20px;
        min-width: 100px;
    }

    .empty-state-animation {
        height: 150px;
    }

    .floating-card {
        width: 100px;
        height: 140px;
    }

    .empty-state-content h2 {
        font-size: 2rem;
    }

    .empty-state-content p {
        font-size: 1.1rem;
    }

    #floating-card-2 {
        left: 20%;
    }

    #floating-card-3 {
        right: 20%;
    }

     .loading-animation {
        width: 100px;
        height: 100px;
    }
    
    .loading-text h2 {
        font-size: 1.5rem;
    }

    .error-state-animation {
        height: 150px;
    }
    
    .error-card {
        width: 80px;
        height: 120px;
    }
    
    .error-state-content h2 {
        font-size: 2rem;
    }
    
    .error-state-content p {
        font-size: 1.1rem;
    }
    
    #error-card-1 {
        left: 10%;
    }
    
    #error-card-2 {
        right: 10%;
    }
    
    .error-state-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-retry,
    .btn-support {
        width: 200px;
    }
        .language-switcher {
        position: absolute;
        margin-top: 15px;
        display: inline-block;
    }
      .empty-language-switcher,
    .error-language-switcher {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 20px;
        display: inline-block;
    }
    
    .empty-state-container,
    .error-state-container {
        position: relative;
    }
}


@media (max-width: 640px) {
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .card {
        height: 320px;
    }

    .card-details {
        padding: 12px;
    }

    .card-name {
        font-size: 1rem;
    }

    .detail-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-back,
    .btn-use {
        width: 100%;
        margin: 5px 0;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .collection-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }

    .card {
        height: 300px;
    }

    .controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        width: auto;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .detail-container {
        padding: 10px 5px;
    }

    .detail-content {
        padding: 15px;
    }

    .detail-description {
        font-size: 1rem;
    }

    .animation-card {
        width: 250px;
        height: 350px;
    }

    header {
        margin-bottom: 20px;
    }

    .empty-state-animation {
        height: 120px;
        margin-bottom: 30px;
    }

    .floating-card {
        width: 80px;
        height: 120px;
    }

    .question-mark {
        font-size: 2rem;
    }

    .empty-state-content h2 {
        font-size: 1.8rem;
    }

    .empty-state-content p {
        font-size: 1rem;
    }

    .btn-refresh {
        padding: 12px 24px;
        font-size: 1rem;
    }

    #floating-card-2 {
        left: 10%;
    }

    #floating-card-3 {
        right: 10%;
    }

    .loading-animation {
        width: 80px;
        height: 80px;
    }
    
    .loading-text h2 {
        font-size: 1.3rem;
    }
    
    .loading-text p {
        font-size: 0.9rem;
    }

    .error-state-animation {
        height: 120px;
    }
    
    .error-card {
        width: 70px;
        height: 100px;
    }
    
    .error-icon {
        font-size: 1.5rem;
    }
    
    .error-state-content h2 {
        font-size: 1.8rem;
    }
    
    .error-state-content p {
        font-size: 1rem;
    }
    
    #error-card-1 {
        left: 5%;
    }
    
    #error-card-2 {
        right: 5%;
    }
}

@media (max-width: 360px) {
    h1 {
        font-size: 1.6rem;
    }

    .card {
        height: 280px;
    }

    .card-name {
        font-size: 0.95rem;
    }

    .card-description {
        font-size: 0.8rem;
    }
}