/* ============================================
   Presentation Page Styles - Prezi-like Interface
   ============================================ */

.presentation-container {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0e27 0%, #1a2552 30%, #4d1a3d 70%, #2d3a6b 100%);
    overflow: hidden;
    cursor: grab;
    user-select: none;
}

.presentation-container:active {
    cursor: grabbing;
}

/* Controls */
.presentation-controls {
    position: fixed;
    top: 90px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.control-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.5);
}

.control-btn:active {
    transform: scale(0.95);
}

/* Mind Map Canvas */
.mindmap-canvas {
    position: absolute;
    width: 3000px;
    height: 3000px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Connection Lines */
.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 3000px;
    height: 3000px;
    pointer-events: none;
    z-index: 1;
}

.connection-lines line {
    stroke: rgba(0, 102, 204, 0.4);
    stroke-width: 3;
    marker-end: url(#arrowhead);
    transition: stroke-width 0.3s ease;
}

/* Mind Map Nodes */
.mindmap-node {
    position: absolute;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.central-node {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.node-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 2rem 2.5rem;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    min-width: 250px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.node-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.node-content:hover::before {
    left: 100%;
}

.node-content.clickable {
    cursor: pointer;
}

.node-content.clickable:hover {
    transform: scale(1.1) translateY(-10px);
    box-shadow: 0 25px 70px rgba(0, 102, 204, 0.5);
    border-color: rgba(0, 102, 204, 0.6);
}

.node-content.clickable:active {
    transform: scale(1.05) translateY(-5px);
}

.central-node .node-content {
    background: var(--gradient-primary);
    color: white;
    min-width: 300px;
    padding: 3rem 3.5rem;
    box-shadow: 0 20px 60px rgba(0, 102, 204, 0.4);
}

.central-node .node-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white;
}

.node-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.node-content:hover .node-icon {
    transform: rotate(10deg) scale(1.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.node-content h2,
.node-content h3 {
    font-family: 'Outfit', sans-serif;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    font-size: 1.8rem;
}

.central-node .node-content h2 {
    font-size: 2.5rem;
}

.node-content h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.central-node .node-content h2,
.central-node .node-content p {
    color: white;
}

.node-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
}

/* Topic Nodes */
.topic-node {
    animation: floatNode 4s ease-in-out infinite;
}

.topic-node:nth-child(2) { animation-delay: 0s; }
.topic-node:nth-child(3) { animation-delay: 0.5s; }
.topic-node:nth-child(4) { animation-delay: 1s; }
.topic-node:nth-child(5) { animation-delay: 1.5s; }
.topic-node:nth-child(6) { animation-delay: 2s; }
.topic-node:nth-child(7) { animation-delay: 2.5s; }

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

/* Zoom Modal */
.zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.zoom-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.zoom-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.8);
        opacity: 0;
    }
}

.subtopic-content {
    animation: zoomIn 0.3s ease-out;
}

.subtopic-content.zoom-animate {
    animation: zoomIn 0.3s ease-out;
}

.close-zoom {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    border: none;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    z-index: 10;
}

.close-zoom:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.5);
}

.zoom-content {
    margin-top: 2rem;
}

.zoom-content img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

/* Image Grid Styling */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem 0;
}

.image-container {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(0, 102, 204, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    z-index: 1;
}

.image-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(0, 102, 204, 0.25);
    border-color: rgba(0, 102, 204, 0.3);
}

.image-container .topic-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 2px solid rgba(0, 0, 0, 0.05);
    background: #f8f9fa;
    padding: 0.5rem;
}

.image-container .topic-image:hover {
    transform: scale(1.05);
    border-color: rgba(0, 102, 204, 0.2);
}

.zoom-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.zoom-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.zoom-content .detail-section {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(163, 5, 99, 0.05) 100%);
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
}

/* PDF Modal */
.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.pdf-modal.active {
    display: flex;
}

.pdf-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #2a2a2a;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.pdf-header h3 {
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin: 0;
}

.close-pdf {
    width: 45px;
    height: 45px;
    border: none;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.close-pdf:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.5);
}

.pdf-viewer {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

#pdfCanvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: white;
    border-radius: 10px;
}

.pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.pdf-btn {
    padding: 0.8rem 2rem;
    border: none;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.5);
}

.pdf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#pageInfo {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 120px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 968px) {
    .presentation-controls {
        top: 80px;
        right: 15px;
        padding: 0.8rem;
        gap: 0.8rem;
    }

    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .mindmap-canvas {
        width: 2000px;
        height: 2000px;
    }

    .node-content {
        padding: 1.5rem 2rem;
        min-width: 200px;
    }

    .central-node .node-content {
        min-width: 250px;
        padding: 2rem 2.5rem;
    }

    .node-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .node-content h2 {
        font-size: 1.5rem;
    }

    .node-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 640px) {
    .images-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
        padding: 1rem 0;
    }

    .image-container {
        padding: 1rem;
    }

    .image-container .topic-image {
        max-height: 300px;
    }

    .presentation-container {
        top: 60px;
    }

    .presentation-controls {
        top: 70px;
        right: 10px;
        flex-direction: row;
        padding: 0.6rem;
        gap: 0.6rem;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .mindmap-canvas {
        width: 1500px;
        height: 1500px;
    }

    .node-content {
        padding: 1.2rem 1.5rem;
        min-width: 180px;
    }

    .central-node .node-content {
        min-width: 220px;
        padding: 1.8rem 2rem;
    }

    .node-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .node-content h2 {
        font-size: 1.3rem;
    }

    .central-node .node-content h2 {
        font-size: 1.8rem;
    }

    .node-content h3 {
        font-size: 1rem;
    }

    .node-content p {
        font-size: 0.85rem;
    }

    .zoom-modal-content {
        padding: 2rem 1.5rem;
        max-width: 95%;
        max-height: 95%;
    }

    .zoom-content h2 {
        font-size: 1.8rem;
    }

    .pdf-header {
        padding: 1rem 1.5rem;
    }

    .pdf-header h3 {
        font-size: 1.2rem;
    }

    .pdf-controls {
        padding: 1rem;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .pdf-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    #pageInfo {
        font-size: 0.95rem;
        width: 100%;
    }
}

