/* ===================================
   Estilos específicos para JavaScript DOM post
   =================================== */

/* Stats grid - 4 elementos en 2x2 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    line-height: 1.3;
}

/* Concept grid - 3 elementos en línea */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.concept-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.concept-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.concept-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.concept-card h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.concept-card p {
    color: var(--text-light);
    line-height: 1.5;
}

/* Powers list */
.powers-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.power-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.power-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.power-content h4 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.power-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.power-content code {
    background: rgba(51, 65, 85, 0.8);
    color: #22c55e;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: block;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

/* Demo containers */
.demo-container {
    background: var(--secondary-bg);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.demo-container h4 {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.demo-button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0.5rem;
}

.demo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.demo-button.secondary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.demo-button.secondary:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.demo-input {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-size: 1rem;
    margin: 0.5rem;
    min-width: 250px;
}

.demo-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.demo-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    text-align: left;
}

.demo-list li {
    background: var(--card-bg);
    color: var(--text-light);
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    border-left: 4px solid var(--accent-blue);
}

.demo-description {
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Secret content animation */
.secret-content {
    background: var(--card-bg);
    color: var(--text-light);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid var(--accent-green);
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.secret-content.visible {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* List demo */
.list-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Counter demo */
.counter-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.counter-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.counter-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.counter-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-primary);
    min-width: 4rem;
    text-align: center;
}

/* Explanation box */
.explanation-box {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.explanation-box h4 {
    color: var(--accent-green);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.explanation-box ol {
    color: var(--text-light);
    margin-left: 1.5rem;
}

.explanation-box ol li {
    margin-bottom: 0.5rem;
}

/* Warning grid - 5 elementos en columna*/
.warning-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.warning-card {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    padding: 2rem;
}

.warning-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.warning-card h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.error-example {
    margin-top: 1rem;
}

.error-example strong {
    color: var(--text-light);
    display: block;
    margin: 1rem 0 0.5rem 0;
}

.error-example pre {
    margin: 0.5rem 0;
}

.error-example p {
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Next steps grid - 3 elementos en línea */
.next-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.next-step-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.next-step-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-blue);
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.next-step-card h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.next-step-card p {
    color: var(--text-light);
    line-height: 1.5;
}

/* Tips grid - 3 elementos en línea */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.tip-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.tip-card h4 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.tip-card ul {
    list-style: none;
    padding: 0;
}

.tip-card li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.tip-card li::before {
    content: "✅";
    position: absolute;
    left: 0;
    top: 0;
}

/* Final demo */
.final-demo {
    max-width: 500px;
    margin: 0 auto;
}

.final-demo h3 {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.demo-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-stats {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.demo-stats p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.demo-stats span {
    color: var(--accent-blue);
    font-weight: bold;
}

/* Challenge box */
.challenge-box {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.challenge-box h4 {
    color: var(--accent-purple);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.challenge-box p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.challenge-box ul {
    color: var(--text-light);
    margin-left: 1.5rem;
}

/* CTA section */
.cta-section {
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 3rem 0;
    border: 2px solid var(--border-color);
}

.cta-section h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.cta-section p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.internal-cta {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    margin: 1rem 0;
    transition: transform 0.3s, box-shadow 0.3s;
}

.internal-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.cta-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .concept-grid {
        grid-template-columns: 1fr;
    }
    
    .next-steps-grid {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .counter-demo {
        gap: 1rem;
    }
    
    .counter-display {
        font-size: 2rem;
        min-width: 3rem;
    }
    
    .counter-btn {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }
    
    .demo-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .demo-input {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-container {
        padding: 1rem;
    }
    
    .concept-card {
        padding: 1.5rem;
    }
    
    .power-item {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .power-number {
        margin-bottom: 1rem;
    }
}