
        body {
            margin: 0;
            padding: 20px;
            background: linear-gradient(135deg, #2F4F4F, #556B2F, #8B4513);
            font-family: 'Arial', sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        .card {
            width: 300px;
            height: 420px;
            background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
            border-radius: 12px;
            border: 2px solid #444;
            box-shadow: 0 8px 25px rgba(128, 0, 0, 0.3), 0 0 50px rgba(139, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .card:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 12px 35px rgba(128, 0, 0, 0.4), 0 0 70px rgba(139, 0, 0, 0.2);
        }

        .card-header {
            background: linear-gradient(90deg, #800000, #B22222);
            padding: 8px 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #333;
        }

        .card-name {
            color: white;
            font-weight: bold;
            font-size: 14px;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
        }

        .mana-cost {
            display: flex;
            gap: 2px;
        }

        .mana-symbol {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            font-weight: bold;
            border: 1px solid #666;
        }

        .mana-red {
            background: linear-gradient(45deg, #ff4444, #cc2222);
            color: white;
        }

        .mana-black {
            background: linear-gradient(45deg, #333333, #111111);
            color: white;
        }

        .mana-colorless {
            background: linear-gradient(45deg, #cccccc, #999999);
            color: black;
        }

        .card-image {
            height: 180px;
            background: 
                radial-gradient(circle at 20% 80%, rgba(128, 0, 0, 0.4), transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(105, 105, 105, 0.3), transparent 60%),
                linear-gradient(135deg, #2F2F2F, #4A4A4A, #1C1C1C, #3A3A3A);
            position: relative;
            border-bottom: 1px solid #333;
            overflow: hidden;
        }

        /* Mechanical/workshop background */
        .workshop-bg {
            position: absolute;
            width: 100%;
            height: 100%;
            opacity: 0.3;
            background: 
                repeating-linear-gradient(45deg, 
                    transparent 0px, transparent 8px, 
                    rgba(128, 0, 0, 0.1) 8px, rgba(128, 0, 0, 0.1) 16px),
                repeating-linear-gradient(-45deg, 
                    transparent 0px, transparent 6px, 
                    rgba(105, 105, 105, 0.08) 6px, rgba(105, 105, 105, 0.08) 12px);
        }

        /* Central disaster cascade */
        .disaster-cascade {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(1.2);
            width: 120px;
            height: 100px;
            animation: cascade-shake 3s ease-in-out infinite;
        }

        /* Initial small problem */
        .initial-problem {
            position: absolute;
            top: 15%;
            left: 50%;
            transform: translateX(-50%);
            width: 15px;
            height: 15px;
            background: 
                radial-gradient(circle, #FFD700, #FFA500, #FF8C00);
            border-radius: 50%;
            border: 2px solid rgba(255, 140, 0, 0.6);
            box-shadow: 
                0 0 15px rgba(255, 215, 0, 0.8),
                0 2px 8px rgba(0, 0, 0, 0.3);
            animation: problem-pulse 2s ease-in-out infinite;
        }

        /* Cascading failures */
        .failure {
            position: absolute;
            background: 
                radial-gradient(circle, #FF6347, #FF4500, #DC143C);
            border-radius: 60% 40% 70% 30%;
            border: 1px solid rgba(220, 20, 60, 0.4);
            box-shadow: 
                0 0 12px rgba(255, 99, 71, 0.6),
                0 3px 10px rgba(0, 0, 0, 0.4);
            animation: failure-cascade 4s ease-out infinite;
        }

        .failure-1 { 
            top: 35%; left: 40%; 
            width: 20px; height: 18px; 
            animation-delay: 0.5s; 
        }
        .failure-2 { 
            top: 30%; right: 35%; 
            width: 25px; height: 22px; 
            animation-delay: 1s; 
        }
        .failure-3 { 
            top: 55%; left: 25%; 
            width: 30px; height: 25px; 
            animation-delay: 1.5s; 
        }
        .failure-4 { 
            top: 50%; right: 20%; 
            width: 35px; height: 28px; 
            animation-delay: 2s; 
        }
        .failure-5 { 
            bottom: 25%; left: 45%; 
            width: 40px; height: 32px; 
            animation-delay: 2.5s; 
        }

        /* Major catastrophe at the end */
        .catastrophe {
            position: absolute;
            bottom: 15%;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 35px;
            background: 
                radial-gradient(ellipse at 50% 30%, 
                    #8B0000, #B22222, #DC143C, #FF6347);
            border-radius: 50% 50% 40% 40%;
            border: 3px solid #8B0000;
            box-shadow: 
                0 0 25px rgba(139, 0, 0, 0.9),
                0 5px 20px rgba(0, 0, 0, 0.5),
                inset 0 3px 8px rgba(255, 255, 255, 0.2);
            animation: catastrophe-explode 4s ease-in-out infinite;
        }

        /* Sparks and debris */
        .spark {
            position: absolute;
            width: 3px;
            height: 3px;
            background: radial-gradient(circle, #FFD700, #FFA500);
            border-radius: 50%;
            box-shadow: 0 0 6px #FFD700;
            animation: spark-fly 3s ease-out infinite;
        }

        .spark-1 { top: 25%; left: 30%; animation-delay: 1s; }
        .spark-2 { top: 40%; right: 25%; animation-delay: 1.8s; }
        .spark-3 { bottom: 35%; left: 35%; animation-delay: 2.5s; }
        .spark-4 { top: 60%; right: 40%; animation-delay: 3s; }

        /* Warning signs and alarms */
        .warning {
            position: absolute;
            font-size: 14px;
            color: #FF4500;
            font-weight: bold;
            text-shadow: 0 0 8px rgba(255, 69, 0, 0.9);
            animation: warning-blink 1.5s ease-in-out infinite;
        }

        .warn-1 { top: 10%; left: 10%; animation-delay: 1s; }
        .warn-2 { top: 80%; right: 15%; animation-delay: 2s; }
        .warn-3 { top: 45%; left: 5%; animation-delay: 3s; }

        .warn-1::before { content: '⚠'; }
        .warn-2::before { content: '🚨'; }
        .warn-3::before { content: '⚠'; }

        /* Broken gears and machinery */
        .gear {
            position: absolute;
            width: 20px;
            height: 20px;
            background: 
                linear-gradient(45deg, #696969, #2F4F4F, #708090);
            border-radius: 20% 70% 20% 70%;
            border: 2px solid #4A4A4A;
            box-shadow: 
                0 2px 8px rgba(0, 0, 0, 0.4),
                inset 1px 1px 3px rgba(255, 255, 255, 0.2);
            animation: gear-malfunction 2s linear infinite;
        }

        .gear::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 8px;
            height: 8px;
            background: #2F2F2F;
            border-radius: 50%;
        }

        .gear-1 { top: 20%; right: 10%; animation-delay: 0s; }
        .gear-2 { bottom: 20%; left: 15%; animation-delay: 1s; animation-direction: reverse; }

       /* Chain reaction arrows */
        .arrow {
            position: absolute;
            width: 0;
            height: 0;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-top: 12px solid rgba(255, 69, 0, 0.7);
            animation: arrow-point 3s ease-in-out infinite;
        }

        .arrow-1 { 
            top: 40%; left: 55%; 
            transform: rotate(45deg); 
            animation-delay: 0.8s; 
        }
        .arrow-2 { 
            top: 60%; left: 60%; 
            transform: rotate(90deg); 
            animation-delay: 1.8s; 
        }

        /* Murphy's quote floating */
        .murphy-quote {
            position: absolute;
            top: 5%;
            left: 50%;
            transform: translateX(-50%);
            font-size: 6px;
            color: rgba(139, 0, 0, 0.8);
            font-family: serif;
            font-style: italic;
            text-align: center;
            text-shadow: 0 0 3px rgba(139, 0, 0, 0.6);
            animation: quote-fade 5s ease-in-out infinite;
        }

        .murphy-quote::before {
            content: 'If it can go wrong...';
        }

        /* Probability meter */
        .probability-meter {
            position: absolute;
            bottom: 10%;
            right: 10%;
            width: 25px;
            height: 8px;
            background: linear-gradient(90deg, #228B22, #FFD700, #FF4500, #8B0000);
            border: 1px solid #333;
            border-radius: 4px;
            animation: meter-fill 4s ease-in-out infinite;
        }

        .probability-meter::after {
            content: '';
            position: absolute;
            top: -15px;
            left: 0;
            font-size: 5px;
            color: #8B0000;
            content: '100%';
        }

        /* Animations */
        @keyframes cascade-shake {
            0%, 90% { transform: translate(-50%, -50%) scale(1.2); }
            95% { transform: translate(-52%, -48%) scale(1.2); }
            100% { transform: translate(-48%, -52%) scale(1.2); }
        }

        @keyframes problem-pulse {
            0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
            50% { transform: translateX(-50%) scale(1.2); opacity: 0.8; }
        }

        @keyframes failure-cascade {
            0%, 20% { transform: scale(0); opacity: 0; }
            30% { transform: scale(1.2); opacity: 1; }
            100% { transform: scale(1) rotate(360deg); opacity: 0.9; }
        }

        @keyframes catastrophe-explode {
            0%, 60% { transform: translateX(-50%) scale(0); opacity: 0; }
            70% { transform: translateX(-50%) scale(1.3); opacity: 1; }
            100% { transform: translateX(-50%) scale(1); opacity: 0.95; }
        }

        @keyframes spark-fly {
            0% { transform: translate(0, 0) scale(0); opacity: 0; }
            20% { transform: translate(0, 0) scale(1); opacity: 1; }
            100% { transform: translate(var(--dx, 20px), var(--dy, -30px)) scale(0); opacity: 0; }
        }

        @keyframes warning-blink {
            0%, 50% { opacity: 0.3; transform: scale(1); }
            75% { opacity: 1; transform: scale(1.2); }
            100% { opacity: 0.3; transform: scale(1); }
        }

        @keyframes gear-malfunction {
            0% { transform: rotate(0deg); }
            25% { transform: rotate(90deg); }
            26% { transform: rotate(85deg); }
            50% { transform: rotate(180deg); }
            51% { transform: rotate(175deg); }
            75% { transform: rotate(270deg); }
            76% { transform: rotate(265deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes arrow-point {
            0%, 30% { opacity: 0; transform: rotate(var(--rotation, 45deg)) scale(0); }
            50%, 90% { opacity: 0.8; transform: rotate(var(--rotation, 45deg)) scale(1); }
            100% { opacity: 0; transform: rotate(var(--rotation, 45deg)) scale(0); }
        }

        @keyframes quote-fade {
            0%, 60% { opacity: 0; }
            70%, 90% { opacity: 0.8; }
            100% { opacity: 0; }
        }

        @keyframes meter-fill {
            0% { width: 5px; }
            100% { width: 25px; }
        }

        .spark-1 { --dx: -25px; --dy: -20px; }
        .spark-2 { --dx: 30px; --dy: -25px; }
        .spark-3 { --dx: -20px; --dy: -35px; }
        .spark-4 { --dx: 25px; --dy: -15px; }

        .arrow-1 { --rotation: 45deg; }
        .arrow-2 { --rotation: 90deg; }

        .type-line {
            background: #333;
            padding: 6px 12px;
            color: white;
            font-size: 12px;
            font-weight: bold;
            border-bottom: 1px solid #444;
        }

        .card-text {
            padding: 12px;
            color: #ddd;
            font-size: 11px;
            line-height: 1.4;
            background: #222;
            flex-grow: 1;
        }

        .ability {
            margin-bottom: 8px;
        }

        .keyword {
            font-weight: bold;
            color: #B22222;
        }

        .flavor-text {
            font-style: italic;
            color: #999;
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px solid #444;
        }

        .power-toughness {
            position: absolute;
            bottom: 8px;
            right: 12px;
            background: #444;
            border: 1px solid #666;
            padding: 4px 8px;
            border-radius: 4px;
            color: white;
            font-weight: bold;
            font-size: 14px;
        }

        .set-info {
            position: absolute;
            bottom: 8px;
            left: 12px;
            font-size: 10px;
            color: #999;
        }
    