/* styles.css */

:root {
    --primary: #00ffff;
    --primary-dark: #00cccc;
    --primary-light: #80ffff;
    --accent: #ff00ff;
    --background: #001414;
    --text: #e0ffff;
    --text-muted: #80b3b3;
    --glow: 0 0 10px var(--primary);
    --panel-bg: rgba(0, 255, 255, 0.05);
    --panel-border: 1px solid var(--primary-dark);
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: 'Share Tech Mono', monospace;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Header */
.book-header {
    text-align: center;
    margin-bottom: 30px;
    text-shadow: var(--glow);
    width: 100%;
}

.series-info {
    color: var(--primary);
    font-size: 1.2em;
    margin-bottom: 10px;
}

.book-title {
    font-size: 2.5em;
    margin: 10px 0;
    color: var(--primary-light);
}

.book-subtitle {
    font-size: 1.5em;
    color: var(--text);
    opacity: 0.8;
}

/* Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Info Sections */
.book-info-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Panel Styling */
.isbn-section, .synopsis, .why-read {
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 5px;
    border: var(--panel-border);
}

.isbn-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ISBN Item Styling */
.isbn-item {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Format | ISBN | Purchase Links */
    gap: 10px;
    padding: 10px 15px;
    border: 1px solid var(--primary);
    border-radius: 3px;
    background: rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.isbn-item:hover {
    box-shadow: var(--glow);
    transform: translateX(5px);
}

/* Label and Value Styling */
.isbn-item .label-value {
    display: flex;
    flex-direction: column;
}

.isbn-item .label-value strong {
    margin-bottom: 5px;
    color: var(--primary-light);
}

.isbn-item .purchase-links {
    display: flex;
    flex-direction: column;
}

.purchase-links a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.purchase-links a:hover {
    color: var(--accent);
    text-shadow: var(--glow);
}

/* Format Actions (merged into formats section) */
.format-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--primary-dark);
}

.format-action-btn {
    display: inline-block;
    padding: 10px 18px;
    font-size: 1em;
    background: var(--primary-dark);
    color: var(--background);
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: none;
}

.format-action-btn:hover {
    background: var(--primary);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

.format-action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.format-action-btn.buy-btn {
    background: #d4a532;
    color: #1a1a1a;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Slider */
.slider-container {
    background: var(--panel-bg);
    border: var(--panel-border);
    border-radius: 5px;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    display: flex;
    box-sizing: border-box;
    padding: 20px;
}

/* Wide image layout */
.slide.wide {
    flex-direction: column;
    align-items: center;
}

.slide.wide .slide-content {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Regular image layout */
.slide:not(.wide) {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.slide:not(.wide) .slide-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.image-container {
    background: rgba(0, 0, 0, 0.2);
    border: var(--panel-border);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 400px;
    position: relative;
}

/* Click to enlarge overlay hint */
.enlarge-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--primary-light);
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.85em;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.image-container:hover .enlarge-hint {
    opacity: 1;
}

.slide-image {
    cursor: pointer;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Legacy slide-text removed - now using .enlarge-hint overlay */

/* Slider Navigation */
.slider-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: var(--panel-bg);
    border-top: var(--panel-border);
}

.slider-nav button {
    padding: 8px 20px;
    background: var(--primary-dark);
    border: none;
    color: var(--background);
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.slider-nav button:hover {
    background: var(--primary);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

.slider-nav button:active {
    transform: translateY(0);
}

/* Slider Indicators */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
}

.slider-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-dark);
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-indicator:hover {
    opacity: 0.8;
}

.slider-indicator.active {
    opacity: 1;
    background: var(--primary);
    box-shadow: var(--glow);
}

/* Button section styling */
.button-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.sample-button-container {
    opacity: 1;
}

.sample-button {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.2em;
    background: var(--primary-dark);
    color: var(--background);
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
    cursor: pointer;
}

.sample-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(20%);
    pointer-events: none;
}

.sample-button.disabled:hover,
.sample-button.disabled:active {
    background: var(--primary-dark);
    box-shadow: none;
    transform: none;
}

.sample-button:hover {
    background: var(--primary);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

.sample-button:active {
    transform: translateY(0);
}

/* Buy section - prominent at top */
.buy-section {
    margin-bottom: 20px;
    text-align: center;
}

/* 50/50 button row */
.buy-buttons-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.buy-btn-half {
    flex: 1;
    padding: 14px 16px;
    font-size: 1.1em;
    border-radius: 6px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Read sample button (left) */
.sample-btn-half {
    background: var(--primary-dark);
    color: var(--background);
    border: 2px solid var(--primary);
}

.sample-btn-half:hover {
    background: var(--primary);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

.sample-btn-half.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.coming-soon-badge {
    font-size: 0.7em;
    background: var(--primary);
    color: var(--background);
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buy button - active (right) */
.buy-btn-active {
    background: #e6b84d;
    color: #1a1a1a;
    border: 2px solid #d4a63d;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(230, 184, 77, 0.3);
}

.buy-btn-active:hover {
    background: #f0c860;
    box-shadow: 0 0 16px rgba(230, 184, 77, 0.5);
    transform: translateY(-2px);
}

/* Buy button - disabled (coming soon) */
.buy-btn-disabled {
    background: #d4a532;
    color: #1a1a1a;
    border: 2px solid #e6b84d;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Legacy prominent button (fallback) */
.buy-btn-prominent {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.3em;
    background: #d4a532;
    color: #1a1a1a;
    border: 2px solid #e6b84d;
    border-radius: 6px;
    cursor: not-allowed;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    opacity: 0.7;
    box-shadow: 0 0 15px rgba(212, 165, 50, 0.3);
}

.buy-btn-prominent:not(:disabled):hover {
    background: #e6b84d;
    box-shadow: 0 0 15px rgba(230, 184, 77, 0.5), 0 0 20px rgba(230, 184, 77, 0.5);
    transform: translateY(-2px);
}

.includes-text {
    margin: 10px 0 0 0;
    font-size: 0.95em;
    color: var(--text-muted);
}

/* Format Groups - grouped by format type */
.format-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--primary-dark);
}

.format-group {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 10px;
    padding: 10px 15px;
    border: 1px solid var(--primary);
    border-radius: 3px;
    background: rgba(0, 255, 255, 0.1);
    align-items: center;
}

.format-group:hover {
    box-shadow: var(--glow);
}

/* Clickable format group (entire box is a link) */
.format-group-link {
    text-decoration: none;
    display: block;
}

.format-group.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-group.clickable:hover {
    box-shadow: var(--glow);
    transform: translateX(5px);
    background: rgba(0, 255, 255, 0.15);
}

.search-indicator {
    color: var(--primary-light);
    font-size: 0.85em;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.format-group.clickable:hover .search-indicator {
    opacity: 1;
}

.format-header {
    font-weight: bold;
}

.format-name {
    color: var(--primary-light);
}

.isbn-values {
    color: var(--text);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9em;
}

.format-group .purchase-links {
    display: flex;
    gap: 8px;
}

.buy-button {
    padding: 15px 30px;
    font-size: 1.2em;
    background: #d4a532;
    color: #1a1a1a;
    border: none;
    border-radius: 5px;
    cursor: not-allowed;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    min-width: 200px;
    opacity: 0.5;
}

.buy-button:hover {
    background: #e6b84d;
    box-shadow: 0 0 15px rgba(212, 165, 50, 0.5);
}

/* Section Titles */
.section-title {
    color: var(--primary);
    font-size: 1.8em;
    margin: 0 0 20px;
    border-bottom: var(--panel-border);
    padding-bottom: 10px;
    text-shadow: var(--glow);
}

/* Legacy .slide-text style removed */

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .container {
        padding: 15px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .book-title {
        font-size: 2em;
    }

    .book-subtitle {
        font-size: 1.2em;
    }

    .button-section {
        flex-direction: column;
    }

    .sample-button,
    .buy-button {
        width: 100%;
        max-width: 300px;
    }

    .slide:not(.wide) .slide-content {
        flex-direction: column;
    }

    .slide:not(.wide) .image-container {
        width: 100%;
        height: 300px;
        margin-bottom: 20px;
    }

    .format-actions {
        justify-content: center;
    }

    .format-action-btn {
        flex: 1;
        min-width: 140px;
    }

    .isbn-item {
        grid-template-columns: 1fr; /* Stack fields vertically */
        text-align: center;
        gap: 5px;
    }

    .purchase-links {
        margin-top: 10px;
    }

    .format-group {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }

    .format-group .purchase-links {
        justify-content: center;
    }

    .buy-btn-prominent {
        font-size: 1.1em;
        padding: 14px 20px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .slider,
    .isbn-item,
    .slider-nav button,
    .buy-button,
    .sample-button {
        transition: none;
    }
}

/* Work in Progress Banner - for Dinkel page */
.wip-banner {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff6b35 100%);
    color: #1a1a1a;
    padding: 12px 20px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
    animation: wip-pulse 2s ease-in-out infinite;
}

.wip-text {
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes wip-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 107, 53, 0.6);
    }
}

/* Feature list styling for Dinkel page */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: var(--text);
}

.feature-list li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Category badge for Dinkel page */
.category-badge {
    display: inline-block;
    background: var(--primary-dark);
    color: #000;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Print styles */
@media print {
    .slider-container,
    .slider-nav,
    .slider-indicators,
    .button-section,
    .wip-banner {
        display: none;
    }
}
