/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
    height: 100vh;
}

/* Container principal */
.presentation-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slides */
.slide {
    display: none;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s ease-in-out;
}

.slide.active {
    display: block;
}

.slide-content {
    padding: 60px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Slide de título */
.title-slide {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.title-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    z-index: 1;
}

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

.main-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.subtitle {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.presenter-info {
    font-size: 1.2rem;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Animação de rede */
.network-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.node {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
    animation: pulse 2s infinite;
}

.client {
    background: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.server {
    background: #2196F3;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.5);
}

.connection {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.connection::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: dataFlow 2s infinite;
}

/* Títulos dos slides */
h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: #2c3e50;
    text-align: center;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Lista de objetivos */
.objectives-list {
    list-style: none;
    font-size: 1.3rem;
    line-height: 2;
}

.objectives-list li {
    padding: 15px 0;
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin-bottom: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 0 10px 10px 0;
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.6s ease-out forwards;
}

.objectives-list li:nth-child(1) { animation-delay: 0.1s; }
.objectives-list li:nth-child(2) { animation-delay: 0.2s; }
.objectives-list li:nth-child(3) { animation-delay: 0.3s; }
.objectives-list li:nth-child(4) { animation-delay: 0.4s; }
.objectives-list li:nth-child(5) { animation-delay: 0.5s; }

/* Modelo OSI */
.osi-model {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.model-comparison {
    display: flex;
    gap: 60px;
    align-items: center;
}

.osi-layers, .tcp-layers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.osi-layers h3, .tcp-layers h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #2c3e50;
}

.layer {
    padding: 12px 24px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.layer:hover {
    transform: translateY(-2px);
}

/* Camadas OSI */
.layer-7 { background: #e74c3c; color: white; }
.layer-6 { background: #e67e22; color: white; }
.layer-5 { background: #f39c12; color: white; }
.layer-4 { background: #27ae60; color: white; }
.layer-3 { background: #3498db; color: white; }
.layer-2 { background: #9b59b6; color: white; }
.layer-1 { background: #34495e; color: white; }

/* Camadas TCP/IP */
.tcp-app { background: #e74c3c; color: white; padding: 20px 24px; }
.tcp-transport { background: #27ae60; color: white; }
.tcp-internet { background: #3498db; color: white; }
.tcp-access { background: #9b59b6; color: white; padding: 20px 24px; }

/* Anatomia HTTP */
.http-anatomy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    height: 100%;
    align-items: center;
}

.http-request, .http-response {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.http-request h3, .http-response h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.4rem;
}

.code-block {
    background: #2c3e50;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    color: #ecf0f1;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Processo DNS */
.dns-process {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.dns-step {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dns-step:hover {
    transform: translateY(-4px);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.step-content p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Arquitetura Cliente-Servidor */
.architecture-diagram {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.client-side, .server-side {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.client-side h3, .server-side h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.4rem;
}

.client-side i, .server-side i {
    font-size: 2rem;
    margin-right: 10px;
    color: #667eea;
}

.client-side ul, .server-side ul {
    list-style: none;
    text-align: left;
    font-size: 1rem;
    line-height: 1.8;
}

.client-side li, .server-side li {
    padding: 5px 0;
    border-bottom: 1px solid #ecf0f1;
}

.communication-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #667eea;
}

.communication-arrow i {
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

.communication-arrow span {
    font-weight: 500;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.metric-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
}

.metric-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.metric-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.metric-card p {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.metric-example {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

/* Códigos de Status */
.status-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.status-group {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.status-group h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    color: white;
}

.success h3 { background: #27ae60; }
.redirect h3 { background: #f39c12; }
.client-error h3 { background: #e74c3c; }
.server-error h3 { background: #8e44ad; }

.status-item {
    padding: 10px 15px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    border-left: 4px solid #667eea;
}

/* Recursos de Segurança */
.security-diagram {
    margin-top: 40px;
}

.security-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.feature {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-4px);
}

.feature i {
    font-size: 3rem;
    color: #27ae60;
    margin-bottom: 15px;
}

.feature h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.feature p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Ferramentas */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.tool-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
}

.tool-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.tool-card h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.tool-card p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Projeto Prático */
.project-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.project-features, .tech-stack {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.project-features h3, .tech-stack h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.project-features ul {
    list-style: none;
}

.project-features li {
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 1rem;
}

.project-features i {
    color: #667eea;
    margin-right: 10px;
    width: 20px;
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-item {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
}

.nodejs { background: #68a063; }
.express { background: #000; }
.ejs { background: #8bc34a; }
.bootstrap { background: #7952b3; }

/* Estrutura do Projeto */
.project-structure {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.file-tree {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    font-family: 'Consolas', monospace;
    font-size: 1rem;
}

.folder, .file {
    padding: 5px 0;
    line-height: 1.6;
}

.folder i {
    color: #f39c12;
    margin-right: 8px;
}

.file i {
    color: #3498db;
    margin-right: 8px;
}

.file-tree-content {
    margin-left: 20px;
    border-left: 2px solid #ecf0f1;
    padding-left: 15px;
}

/* Deploy Steps */
.deploy-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.deploy-step {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.deploy-step:hover {
    transform: translateY(-4px);
}

.step-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.deploy-step h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.deploy-step p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Exercícios */
.exercises {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.exercise-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.exercise-card:hover {
    transform: translateY(-4px);
}

.exercise-card h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.exercise-card i {
    color: #667eea;
    margin-right: 8px;
}

.exercise-card p {
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Slide de Conclusão */
.conclusion-slide {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.conclusion-slide h2 {
    color: white;
    margin-bottom: 40px;
}

.conclusion-slide h2::after {
    background: white;
}

.conclusion-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.key-points, .next-steps {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.key-points h3, .next-steps h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.key-points ul, .next-steps ul {
    list-style: none;
}

.key-points li, .next-steps li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1rem;
}

.thank-you {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.thank-you h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.thank-you p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Controles */
.controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.control-btn {
    background: #667eea;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: #5669d4;
    transform: translateY(-2px);
}

.control-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.slide-counter {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    min-width: 60px;
    text-align: center;
}

/* Barra de Progresso */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 6.67%;
    transition: width 0.3s ease;
}

/* Animações */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes dataFlow {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsividade */
@media (max-width: 1024px) {
    .slide-content {
        padding: 40px;
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.5rem;
    }
    
    .model-comparison {
        flex-direction: column;
        gap: 30px;
    }
    
    .http-anatomy {
        grid-template-columns: 1fr;
    }
    
    .architecture-diagram {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .metrics-grid,
    .tools-grid,
    .deploy-steps,
    .exercises {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .slide {
        width: 95%;
        height: 85vh;
    }
    
    .slide-content {
        padding: 30px;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .controls {
        bottom: 20px;
        padding: 10px 20px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .conclusion-content {
        grid-template-columns: 1fr;
    }
    
    .project-overview {
        grid-template-columns: 1fr;
    }
    
    .dns-process {
        grid-template-columns: 1fr;
    }
    
    .status-codes {
        grid-template-columns: 1fr;
    }
    
    .security-features {
        grid-template-columns: 1fr;
    }
}

/* Modo tela cheia */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

.fullscreen .slide {
    width: 100%;
    height: 100vh;
    border-radius: 0;
}

/* Tema escuro para código */
.code-block {
    background: #1e1e1e;
    border: 1px solid #333;
}

.code-block pre {
    color: #d4d4d4;
}

/* Efeitos de hover para elementos interativos */
.slide-content > * {
    transition: all 0.3s ease;
}

/* Suporte para impressão */
@media print {
    .controls,
    .progress-bar {
        display: none;
    }
    
    .slide {
        display: block !important;
        page-break-after: always;
        height: auto;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .slide-content {
        padding: 20px;
    }
    
    .title-slide {
        background: #f5f5f5 !important;
        color: #333 !important;
    }
    
    .conclusion-slide {
        background: #f5f5f5 !important;
        color: #333 !important;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Foco para navegação por teclado */
.control-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Estados de carregamento */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Transições suaves entre slides */
.slide-transition {
    transition: all 0.5s ease-in-out;
}

/* Melhorias visuais */
.slide {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Destaque para elementos importantes */
.highlight {
    background: linear-gradient(120deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

/* Efeitos de entrada dos slides */
.slide.slide-in {
    animation: slideIn 0.5s ease-in-out;
}

.slide.slide-out {
    animation: slideOut 0.5s ease-in-out;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}