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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1136d7 0%, #0fce42 100%);
    min-height: 100vh;
    overflow-x: hidden;
}
footer {
  background-color: #1e1e2f; /* tom escuro elegante */
  color: #ffffff;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  bottom: 0;
  width: 100%;
}

footer a {
  color: #4fc3f7; /* azul suave */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #81d4fa; /* tom mais claro ao passar o mouse */
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: brilho 3s infinite;
}

@keyframes brilho {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.title {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.subtitle {
    color: #e0e7ff;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f5ff, #00d4ff);
    border-radius: 10px;
    transition: width 0.8s ease;
    box-shadow: 0 0 10px rgba(0,245,255,0.6);
}

.game-area {
    display: flex;
    gap: 20px;
    flex: 1;
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.phase-title {
    font-size: 1.8rem;
    color: #00f5ff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0,245,255,0.5);
}

.story-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e0e7ff;
}

.challenge-text {
    background: rgba(0,245,255,0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #00f5ff;
    font-weight: bold;
    color: #fff;
}

.code-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid rgba(255,255,255,0.2);
}

.code-label {
    color: #00f5ff;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.code-editor {
    width: 100%;
    min-height: 200px;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(0,245,255,0.3);
    border-radius: 10px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #fff;
    resize: vertical;
    backdrop-filter: blur(5px);
}

.code-editor:focus {
    outline: none;
    border-color: #00f5ff;
    box-shadow: 0 0 20px rgba(0,245,255,0.3);
}

.buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-execute {
    background: linear-gradient(45deg, #00f5ff, #00d4ff);
    color: #000;
}

.btn-execute:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,245,255,0.3);
}

.btn-next {
    background: linear-gradient(45deg, #10b981, #059669);
    color: #fff;
    opacity: 0.5;
    pointer-events: none;
}

.btn-next.enabled {
    opacity: 1;
    pointer-events: auto;
}

.btn-next.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16,185,129,0.3);
}

.right-panel {
    flex: 1;
}

.preview-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    height: 100%;
    border: 2px solid rgba(255,255,255,0.2);
}

.preview-label {
    color: #00f5ff;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.preview-frame {
    width: 100%;
    height: calc(100% - 60px);
    border: 2px solid rgba(0,245,255,0.3);
    border-radius: 10px;
    background: #fff;
    overflow: auto;
}

.feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px 50px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.feedback.show {
    opacity: 1;
    visibility: visible;
}

.feedback.success {
    background: linear-gradient(45deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 20px 40px rgba(16,185,129,0.4);
}

.feedback.error {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 20px 40px rgba(239,68,68,0.4);
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #00f5ff;
    border-radius: 50%;
    animation: particleFloat 3s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-200px) scale(0);
    }
}

.phase-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,245,255,0.2);
    padding: 10px 20px;
    border-radius: 20px;
    color: #fff;
    font-weight: bold;
    backdrop-filter: blur(10px);
}

@media (max-width: 1024px) {
    .game-area {
        flex-direction: column;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .container {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 1.5rem;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .btn {
        padding: 15px;
        font-size: 0.9rem;
    }
}
