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

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    background-color: #ffffff;
    color: #000000;
    direction: rtl;
    overflow: hidden;
}

body.index-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-y: auto;
}

/* Index Page Styles */

.index-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    direction: rtl;
}

.index-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 60px;
    gap: 30px;
}

.index-logo {
    width: 120px;
    height: 120px;
}

.index-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.index-title-section {
    text-align: center;
    width: 100%;
}

.index-container h1 {
    font-size: 64px;
    margin-bottom: 30px;
    text-align: center;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: bold;
}


.deck-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 0;
}

.deck-item {
    aspect-ratio: 1;
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.deck-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.deck-item:hover::before {
    opacity: 1;
}

.deck-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.deck-item-1 {
    background-image: url('../decks/big_bang/images/slide01_pillars_of_creation.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.deck-item-1::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%);
    border-radius: 16px;
}

.deck-item-1 a {
    z-index: 2;
}

.deck-item-2 {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.deck-item-3 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.deck-item-4 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.deck-item-5 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.deck-item-6 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.deck-item a {
    text-decoration: none;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    z-index: 2;
}

.deck-icon {
    font-size: 64px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.deck-title {
    font-size: 32px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Blackout Overlay */
.blackout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.blackout-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Slide Container Styles */
.slide-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.slide {
    display: none;
    width: 95%;
    max-width: 1400px;
    height: 100vh;
    padding: 30px 40px;
    text-align: center;
    direction: rtl;
    overflow: hidden;
}

.slide.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.slide h1 {
    font-size: 64px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.slide h2 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.slide h3 {
    font-size: 40px;
    margin-bottom: 15px;
    line-height: 1.2;
}

.slide p {
    font-size: 36px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.slide ul {
    list-style: none;
    text-align: right;
    font-size: 32px;
    line-height: 1.4;
    margin: 10px 0;
}

.slide ul li {
    margin-bottom: 8px;
    padding-right: 20px;
}

.slide ul li:before {
    content: "• ";
    font-size: 36px;
    margin-left: 10px;
}

.slide ol {
    text-align: right;
    font-size: 32px;
    line-height: 1.4;
    margin: 10px 0;
    padding-right: 40px;
}

.slide ol li {
    margin-bottom: 8px;
}

.slide strong {
    font-weight: bold;
}

.slide em {
    font-style: italic;
}

/* Image Styles */
.slide img {
    max-width: 100%;
    max-height: 40vh;
    object-fit: contain;
    margin: 10px 0;
    border-radius: 8px;
}

.slide-image-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    flex-shrink: 0;
}

.image-caption {
    font-size: 20px;
    color: #666;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.4;
}

.slide-content.side-by-side .slide-image-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-content.side-by-side .slide-image-container img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Summary images grid */
.summary-images-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 15px 0;
    flex-wrap: wrap;
}

.summary-image-item {
    flex: 0 0 30%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.summary-image-item img {
    max-width: 100%;
    max-height: 25vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Full Background Image Slide with Text Overlay */
.slide.full-background {
    padding: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.slide.full-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

.slide.full-background .slide-content {
    position: relative;
    z-index: 2;
}

.slide.full-background .slide-text {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.slide.full-background h2,
.slide.full-background h3 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Top Text with Full Image Below Layout */
.slide.top-text-image {
    padding: 0;
}

.slide.top-text-image .slide-content {
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.slide.top-text-image .slide-text {
    flex: 0 0 auto;
    padding: 30px 40px;
    text-align: center;
    background-color: #ffffff;
    width: 100%;
}

.slide.top-text-image .slide-image-container {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.top-text-image .slide-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    margin: 0;
}

/* Rounded Image Layout */
.slide-content.rounded-image-layout {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.slide-content.rounded-image-layout .slide-image-container {
    flex: 0 0 40%;
}

.slide-content.rounded-image-layout .slide-image-container img {
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.slide-content.rounded-image-layout .slide-text {
    flex: 0 0 55%;
}

/* Tiled 3-Image Grid Layout */
.tiled-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin: 20px 0;
}

.tiled-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.tiled-item img {
    width: 100%;
    height: 40vh;
    object-fit: cover;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
}

.tiled-item-caption {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: #333;
}

/* Color-coded Text */
.text-red {
    color: #e74c3c;
}

.text-yellow {
    color: #f39c12;
}

.text-blue {
    color: #3498db;
}

.text-green {
    color: #27ae60;
}

/* Video Button */
.video-button-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 24px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease;
    font-family: 'Arial', 'Helvetica', sans-serif;
    direction: rtl;
}

.video-button:hover {
    background-color: #c0392b;
}

.video-icon {
    font-size: 20px;
    line-height: 1;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    color: #000;
    font-size: 36px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20001;
    transition: background-color 0.3s ease;
    line-height: 1;
    padding: 0;
}

.video-modal-close:hover {
    background-color: rgba(255, 255, 255, 1);
}

.video-modal-iframe-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-modal-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.image-modal-content {
    position: relative;
    width: 90%;
    max-width: 1400px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal-content img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    color: #000;
    font-size: 36px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20001;
    transition: background-color 0.3s ease;
    line-height: 1;
    padding: 0;
}

.image-modal-close:hover {
    background-color: rgba(255, 255, 255, 1);
}

/* Audio Player */
.audio-player {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s ease;
    font-family: 'Arial', 'Helvetica', sans-serif;
    direction: rtl;
}

.play-button:hover {
    background-color: #45a049;
}

.play-button.playing {
    background-color: #f44336;
}

.play-button.playing:hover {
    background-color: #da190b;
}

.play-icon {
    font-size: 24px;
    line-height: 1;
}

/* Navigation Controls */
.navigation-controls {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    pointer-events: none;
}

.nav-button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.nav-button:hover {
    background-color: #555;
}

.nav-button:active {
    background-color: #222;
}

.nav-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.arrow-button {
    background-color: rgba(51, 51, 51, 0.7);
    color: #fff;
    border: none;
    padding: 0;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    pointer-events: auto;
}

.arrow-button:hover {
    background-color: rgba(85, 85, 85, 0.9);
}

.arrow-button:active {
    background-color: rgba(34, 34, 34, 0.9);
}

.arrow-button:disabled {
    background-color: rgba(204, 204, 204, 0.5);
    cursor: not-allowed;
}

/* Slide Logo */
.slide-logo {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 80px;
    height: 80px;
}

.slide-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Slide Counter */
.slide-counter {
    position: fixed;
    top: 30px;
    left: 30px;
    font-size: 24px;
    color: #666;
    z-index: 1000;
    direction: ltr;
}

/* Title Slide Special Styling */
.slide.title-slide {
    text-align: center;
}

.slide.title-slide h1 {
    font-size: 72px;
    margin-bottom: 20px;
}

.slide.title-slide h3 {
    font-size: 48px;
    color: #444;
}

/* Content Layout */
.slide-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    gap: 15px;
}

.slide-text {
    width: 100%;
    max-width: 1200px;
    flex-shrink: 0;
}

/* Side-by-side layout for image left, text right */
.slide-content.side-by-side {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Side-by-side layout for image right, text left */
.slide-content.side-by-side.image-right {
    flex-direction: row;
}

.slide-content.side-by-side .slide-image-container {
    flex: 0 0 45%;
    margin: 0;
}

.slide-content.side-by-side .slide-text {
    flex: 0 0 50%;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .slide {
        padding: 30px;
        height: 80vh;
    }
    
    .slide h1 {
        font-size: 48px;
    }
    
    .slide h2 {
        font-size: 40px;
    }
    
    .slide h3 {
        font-size: 36px;
    }
    
    .slide p,
    .slide ul,
    .slide ol {
        font-size: 28px;
    }
    
    .nav-button {
        padding: 12px 24px;
        font-size: 20px;
    }
    
    .arrow-button {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

