/* =====================================================
   GLOBAL STYLES
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #000000 0%, #00264d 50%, #001a4d 100%);
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, #7080db1a 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, #4a90e21a 0%, transparent 50%);
    pointer-events: none;
}

.hero__content {
    z-index: 1;
    text-align: center;
    max-width: 1200px;
}

.hero__title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #d4d4d8 0%, #aed6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(167, 139, 250, 0.2);
}

.hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #e7dddd;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cards-container {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0 4rem;
}

/* =====================================================
   CARD STYLES (Subtle Shiny)
   ===================================================== */

.card {
    --mx: 50%;
    --my: 50%;
    --posx: 50%;
    --posy: 50%;
    --hyp: 0;
    
    width: min(380px, 100%);
    height: clamp(540px, 56vh, 590px);
    max-height: 590px;
    perspective: 1200px;
    cursor: pointer;
    user-select: none;
}

@media (min-width: 1200px) {
    .card {
        width: 380px;
    }
    .cards-container {
        gap: 1.75rem;
    }
}

@media (max-height: 780px) {
    .hero {
        padding: 1.25rem;
    }

    .cards-container {
        margin-bottom: 1.5rem;
        gap: 1rem;
    }

    .scroll-hint {
        margin-top: 1rem;
        font-size: 0.9rem;
    }
}

.card__translater {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.3s ease-out;
}

.card__rotator {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    will-change: transform;
    border-radius: 18px;
    position: relative;
    transition: box-shadow 0.4s ease, transform 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.card__rotator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.card:hover .card__rotator {
    box-shadow: 0 18px 60px rgba(167, 139, 250, 0.25);
}

.card__front {
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.card[data-type="monster"] .card__front {
    background: linear-gradient(135deg, #ee4242 0%, #9b2121 100%);
    border: 1px solid rgba(200, 100, 255, 0.28);
}

.card[data-type="spell"] .card__front {
    background: linear-gradient(135deg, #a442ee 0%, #2e219b 100%);
    border: 1px solid rgba(100, 180, 255, 0.28);
}

.card[data-type="item"] .card__front {
    background: linear-gradient(135deg, #2B303A 0%, #181f2d 100%);
    border: 1px solid rgba(177, 115, 49, 0.28);
}

.card__content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
}

.card__header {
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.card__header h2 {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: #fff;
}

.card__header p {
    margin: 0.65rem 0 0.35rem;
    font-style: italic;
    color: #cfd4dd;
    text-transform: capitalize;
    line-height: 1.4;
}

.card__header span {
    font-size: 0.82rem;
    color: #b6bcc7;
}

.card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.55rem;
}

.card__meta-item {
    padding: 0.45rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card__meta-item strong {
    display: block;
    font-size: 0.64rem;
    text-transform: uppercase;
    color: #cfd4dd;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.card__meta-item span {
    font-size: 0.85rem;
    color: #f4f4f6;
    line-height: 1.3;
}

.card__stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
    margin-bottom: 0.55rem;
}

.card__stat-item {
    padding: 0rem 0.65rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    text-align: center;
}

.card__stat-item strong {
    display: block;
    font-size: 0.62rem;
    color: #cfd4dd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.1rem;
}

.card__stat-item span {
    display: block;
    font-size: 0.9rem;
    color: #f8fafc;
}

.card__stat-item small {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.8rem;
    color: #cfd4dd;
}

.card__details {
    display: grid;
    /* gap: 0.5rem; */
    color: #cbd5e1;
    font-size: 0.82rem;
    text-align: left;
}

.card__details strong {
    display: inline-block;
    margin-right: 0.35rem;
    color: #cfd4dd;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.card__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.95rem;
    color: #d4d4d8;
}

.card__entry {
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d4d4d8;
    line-height: 1.55;
    text-align: left;
    font-size: 0.9rem;
}

.card__traits {
    display: grid;
    gap: 1rem;
}

.card__actions {
    display: grid;
}

.card__actions h4 {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.55rem;
}

.card__actions ul {
    margin: 0;
    list-style: none;
    color: #e5e7eb;
    font-size: 0.75rem;
}

.card__actions li {
    margin-bottom: 0.65rem;
    line-height: 1;
}

.card__actions strong {
    color: #f8fafc;
    font-weight: 700;
}

.card__actions i {
    font-style: italic;
}

.card__source {
    display: none;
}

/* =====================================================
   CARD SHINE EFFECT (Subtle)
   ===================================================== */

.card__shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px;
    pointer-events: none;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.card:hover .card__shine {
    opacity: 1;
}

.card[data-type="monster"] .card__shine {
    background: 
        linear-gradient(
            135deg,
            rgba(200, 100, 255, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at var(--mx) var(--my),
            rgba(255, 255, 255, 0.2) 0%,
            rgba(200, 100, 255, 0.1) 30%,
            transparent 70%
        );
    background-blend-mode: screen, soft-light;
}

.card[data-type="spell"] .card__shine {
    background: 
        linear-gradient(
            135deg,
            rgba(100, 180, 255, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at var(--mx) var(--my),
            rgba(255, 255, 255, 0.2) 0%,
            rgba(100, 180, 255, 0.1) 30%,
            transparent 70%
        );
    background-blend-mode: screen, soft-light;
}

.card[data-type="item"] .card__shine {
    background: 
        linear-gradient(
            135deg,
            rgba(255, 180, 100, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at var(--mx) var(--my),
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 180, 100, 0.1) 30%,
            transparent 70%
        );
    background-blend-mode: screen, soft-light;
}

/* =====================================================
   SCROLL HINT
   ===================================================== */

.scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #cfd4dd;
    font-size: 0.95rem;
    margin-top: 2rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.scroll-hint svg {
    width: 20px;
    height: 20px;
    color: #60a5fa;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   INSTRUCTIONS SECTION
   ===================================================== */

.instructions {
    min-height: 100vh;
    padding: 4rem 2rem;
    background: #181f2d;
    position: relative;
}

.instructions__content {
    max-width: 1000px;
    margin: 0 auto;
}

.instructions h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 3rem;
    text-align: center;
    background: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instruction-step {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.instruction-step:nth-child(2) {
    animation-delay: 0.1s;
}

.instruction-step:nth-child(3) {
    animation-delay: 0.2s;
}

.instruction-step:nth-child(4) {
    animation-delay: 0.3s;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #2B303A;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.step-content p {
    color: #e7dddd;
    margin-bottom: 1rem;
}

.step-visual {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 1rem;
}

.step-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: #111;
}

.placeholder-gif {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(96, 165, 250, 0.1) 100%);
    border: 2px dashed rgba(167, 139, 250, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #808080;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.instruction-step:hover .placeholder-gif {
    border-color: rgba(167, 139, 250, 0.6);
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2) 0%, rgba(96, 165, 250, 0.2) 100%);
}

/* =====================================================
   FEATURES SECTION
   ===================================================== */

.features {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
}

.features__content {
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    padding: 2rem;
    background: rgba(167, 139, 250, 0.05);
    border: 1px solid rgba(167, 139, 250, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
}

.feature:hover {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.3);
    transform: translateY(-5px);
}

.feature__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.feature p {
    color: #e7dddd;
    font-size: 0.95rem;
}

/* =====================================================
   CTA SECTION
   ===================================================== */

.cta-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #a78bfa26 0%, #001a4d 100%);
    border-top: 1px solid rgba(167, 139, 250, 0.2);
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: #fff;
}

.cta-section p {
    font-size: 1.1rem;
    color: #e7dddd;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #60a5fa;
    border: 2px solid #60a5fa;
}

.btn-secondary:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: #a78bfa;
    color: #a78bfa;
}

/* =====================================================
   SUPPORT SECTION
   ===================================================== */

.support {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #0a0a1a 0%, #0f1a2e 100%);
    border-top: 1px solid rgba(167, 139, 250, 0.1);
    text-align: center;
}

.support-content {
    max-width: 600px;
    margin: 0 auto;
}

.support p {
    font-size: 1.1rem;
    color: #e7dddd;
    margin-bottom: 1.5rem;
}

.btn-coffee {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #FFDD00;
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 221, 0, 0.3);
}

.btn-coffee:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 221, 0, 0.4);
    background: #FFE433;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .cards-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 90%;
    }

    .instruction-step {
        grid-template-columns: 1fr;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

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

    .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
