/* 
 * Infinite Heroes CSS 
 * Matches Cockpit "Modern Soft" aesthetic 
 */

#tab-infinite-heroes-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

.ih-hero-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ih-hero-title-red { color: #FF6B6B; }
.ih-hero-title-yellow { color: #F59E0B; }

.ih-setup-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* Upload Boxes */
.ih-upload-box {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.2);
}

.ih-upload-box.active {
    border-color: var(--success);
    background: rgba(46, 160, 67, 0.1);
}

.ih-upload-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid rgba(255,255,255,0.1);
}

/* Comic Book Viewer */
.ih-book-container {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 600px;
    max-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1500px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.8s ease-in-out;
    transform: scale(0.95);
}

.ih-book-container.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    margin-top: 2rem;
}

/* Standard HTML/CSS 3D Book logic adapted from prototype */
.ih-book {
    position: relative;
    width: 480px;
    height: 720px;
    transform-style: preserve-3d;
    transition: transform 1s ease-in-out;
}

.ih-book.opened {
    transform: translateX(240px); /* Shift right so open book is centered */
}

.ih-paper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.ih-paper.flipped {
    transform: rotateY(-180deg);
}

.ih-page-front, .ih-page-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    background: #050505;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 2px 8px 8px 2px;
    overflow: hidden;
    box-shadow: inset 4px 0 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.ih-page-back {
    transform: rotateY(180deg);
    border-radius: 8px 2px 2px 8px;
    box-shadow: inset -4px 0 10px rgba(0,0,0,0.5);
}

.ih-panel-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ih-panel-image.cover {
    object-fit: cover;
}

.ih-page-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.1) 20%, 
        rgba(255,255,255,0) 40%, 
        rgba(0,0,0,0.4) 100%);
    z-index: 10;
    pointer-events: none;
}
.ih-page-front > .ih-page-spine { left: 0; }
.ih-page-back > .ih-page-spine { right: 0; transform: scaleX(-1); }

/* Generating FX */
.ih-loading-fx {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #111;
    z-index: 20;
}

.ih-loading-fx .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ih-spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes ih-spin { 100% { transform: rotate(360deg); } }

/* Decision choices */
.ih-decisions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    padding-bottom: 3rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 30;
    transition: opacity 0.3s;
}

.ih-decisions.resolved {
    opacity: 0;
    pointer-events: none;
}

.ih-decision-btn {
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-family: var(--font-display);
    transition: transform 0.2s;
}
.ih-decision-btn.secondary {
    background: #333;
    color: #fff;
}
.ih-decision-btn:hover {
    transform: scale(1.02);
}

.ih-download-btn {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
}
