/* ===== FALLACY CARDS CSS ===== */
/* Trading card system for logical fallacies */

.fallacy-card-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.fallacy-card {
    width: 280px;
    height: 420px;
    position: relative;
    border-radius: 20px;
    margin: 0 auto;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 20px;
}

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

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid #ffffff;
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-back {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    transform: rotateY(180deg);
    color: white;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Card Rarity Borders */
.fallacy-card.common .card-front,
.fallacy-card.common .card-back {
    border-color: #ffffff; /* White */
}

.fallacy-card.uncommon .card-front,
.fallacy-card.uncommon .card-back {
    border-color: #ffffff; /* White */
}

.fallacy-card.rare .card-front,
.fallacy-card.rare .card-back {
    border-color: #ffffff; /* White */
}

.fallacy-card.epic .card-front,
.fallacy-card.epic .card-back {
    border-color: #f6ad55; /* Orange */
    box-shadow: 0 10px 30px rgba(246, 173, 85, 0.4);
}

.fallacy-card.legendary .card-front,
.fallacy-card.legendary .card-back {
    border-color: #ffd700; /* Gold */
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
}

.fallacy-card.legendary {
    animation: legendary-glow 2s ease-in-out infinite alternate;
}

@keyframes legendary-glow {
    from {
        box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
    }
    to {
        box-shadow: 0 15px 40px rgba(255, 215, 0, 0.8);
    }
}

/* Card Header - Top banner */
.card-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(59, 130, 246, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 2;
}

.card-title {
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-rarity {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rarity-star {
    color: #ffd700;
    font-size: 1.4rem;
}

/* Card Art Area - Where custom graphics would go */
.card-art {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    height: 160px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.card-icon {
    font-size: 11rem;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

/* When custom graphics are added, this would be replaced with: */
.card-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card Content Area */
.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: rgba(37, 99, 235, 0.9);
    padding: 15px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-category {
    font-size: 0.7rem;
    color: #bfdbfe;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

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

.card-description {
    font-size: 0.9rem;
    color: #dbeafe;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    flex-grow: 1;
}

/* Card Back Content */
.card-back-content {
    text-align: center;
    position: relative;
    padding-top: 20px;
}

.card-back-header {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: -30px;
    color: #ffd700;
    transform: rotate(-15deg);
    z-index: 2;
    position: relative;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.card-tip {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ffd700;
}

.card-examples {
    font-size: 0.95rem;
    opacity: 0.95;
}

.card-examples strong {
    color: #ffd700;
}

/* Discovery Animation */
.card-discovered {
    animation: card-discover 1s ease-out;
}

@keyframes card-discover {
    0% {
        transform: scale(0) rotateY(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotateY(90deg);
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

/* "NEW!" Badge */
.card-new-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4757;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: bold;
    z-index: 3;
    animation: pulse-badge 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Expanded Card View */
.card-expanded {
    width: 400px;
    height: 280px;
    z-index: 1000;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.1);
}

.card-expanded .card-content {
    height: 120px;
    padding: 20px;
}

.card-expanded .card-description {
    -webkit-line-clamp: 4;
    font-size: 0.85rem;
}

/* Collection Grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Collection Stats */
.collection-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fallacy-card {
        width: 280px;
        height: 180px;
    }
    
    .collection-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .card-expanded {
        width: 320px;
        height: 240px;
    }
}