@import url("basic.css");

/* 2D Transform items */
.transform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 1rem;
}

.transform-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.transform-target {
    background: #ffffff;
    border: 2px solid #008080;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.transform-target img {
    width: 44px;
    height: 44px;
}

.transform-box:hover .target-rotate {
    transform: rotate(45deg);
}

.transform-box:hover .target-scale {
    transform: scale(1.25);
}

.transform-box:hover .target-skew {
    transform: skewX(-15deg);
}

.transform-box:hover .target-translate {
    transform: translate(15px, -15px);
}

.transform-box:hover .target-origin {
    transform-origin: top left;
    transform: rotate(30deg);
}

/* 3D Flip Card */
.flip-card-container {
    perspective: 1000px;
    width: 200px;
    height: 280px;
    margin: 0 auto;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

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

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.flip-card-front {
    background: #ffffff;
    border: 2px solid #e2e8f0;
}

.flip-card-back {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    transform: rotateY(180deg);
    border: 2px solid #334155;
}

/* Isometric Card Stack */
.iso-stage {
    perspective: 1000px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iso-stack {
    position: relative;
    width: 160px;
    height: 100px;
    transform: rotateX(60deg) rotateZ(-45deg);
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.iso-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
    box-shadow: -10px 10px 20px rgba(0,0,0,0.15);
    transition: transform 0.4s ease;
}

.iso-layer-1 { background: #3b82f6; transform: translateZ(0px); }
.iso-layer-2 { background: #10b981; transform: translateZ(30px); }
.iso-layer-3 { background: #f59e0b; transform: translateZ(60px); }

.iso-stage:hover .iso-layer-1 { transform: translateZ(0px); }
.iso-stage:hover .iso-layer-2 { transform: translateZ(50px); }
.iso-stage:hover .iso-layer-3 { transform: translateZ(100px); }
