/**
 * Tutorial Demo Styles
 * DevPanicZone - Don't DevPanic. Cheat.
 * 
 * Wiederverwendbare Styles für interaktive Tutorial-Demos
 * Kann von mehreren Tutorials verwendet werden
 */

/* ====================================
   css-mobile-first.html
   ==================================== */
/* Interactive Demo Container */
.demo-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.demo-output {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
    min-height: 50px;
    font-family: 'Courier New', monospace;
}

.demo-button {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    transition: background 0.3s;
}

.demo-button:hover {
    background: var(--accent-blue-hover);
}

.demo-input {
    padding: 0.5rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text-muted);
    margin: 5px;
    width: 200px;
}

.example {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;

}

.example-title {
    padding: 0 0 10px 0;
}

.example p {
    padding: 10px 0 0 0;
    margin-bottom: 0 !important;
}

/* Variable Demo Styles */
.variable-demo {
    background-color: var(--bg-secondary);
    padding: 10px;
    border-left: 4px solid #007bff;
    margin: 10px 0;
}

/* Console Output Styles */
.console-output {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
}

.console-log {
    color: #4ec9b0;
}

.console-error {
    color: #f48771;
}

.dom-demo-box {
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin: 10px 0;
}

/* Comparison Grid - für Side-by-Side Vergleiche (z.B. unsafe vs safe code) */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.comparison-box {
    padding: 15px;
    border-radius: 8px;
}

.unsafe-example {
    background: #fff5f5;
    border: 2px solid #fc8181;
}

.safe-example {
    background: #f0fff4;
    border: 2px solid #68d391;
}

.example-label {
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.example-label::before {
    content: "✗";
    display: inline-block;
    margin-right: 8px;
    font-size: 20px;
}

.safe-example .example-label::before {
    content: "✓";
    color: #28a745;
}

.unsafe-example .example-label::before {
    content: "✗";
    color: #dc3545;
}

/* Security-specific styles */
.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.danger-box {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.safe-box {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

/* Responsive: Bei kleinen Bildschirmen untereinander statt nebeneinander */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .demo-input {
        width: 100%;
        max-width: 300px;
    }
}

/* ====================================
   css-mobile-first.html
   ==================================== */

/* Mobile First Grid Demo */
.grid-item-2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}


/* Testing Devices Showcase */
.devices-showcase {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-end;
    margin: 30px 0;
    flex-wrap: wrap;
}

.device {
    background: #333;
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.device-screen {
    background: rgb(120, 153, 159);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #333;
    font-weight: bold;
}

.device.mobile .device-screen {
    width: 120px;
    height: 200px;
}

.device.tablet .device-screen {
    width: 180px;
    height: 240px;
}

.device.desktop .device-screen {
    width: 280px;
    height: 180px;
}

/* Touch Target Demo */
.touch-demo {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0;
    justify-content: center;
}

.touch-target {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.touch-target.small {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

.touch-target.good {
    width: 44px;
    height: 44px;
    font-size: 14px;
}

.touch-target.large {
    min-width: 48px;
    min-height: 48px;
    padding: 12px 20px;
    font-size: 16px;
}

.touch-target:hover {
    background: #764ba2;
    transform: scale(1.05);
}

.touch-label {
    text-align: center;
    width: 100%;
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Breakpoint Visualisierung */
        .breakpoint-demo {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 40px 20px;
            border-radius: 8px;
            text-align: center;
            margin: 20px 0;
            font-weight: bold;
            font-size: 18px;
        }

        .breakpoint-demo::before {
            content: "📱 Mobile (< 768px)";
        }

        @media (min-width: 768px) {
            .breakpoint-demo {
                background: linear-gradient(135deg, #f093fb 0%, #4facfe 100%);
            }

            .breakpoint-demo::before {
                content: "📱 Tablet (768px - 1023px)";
            }
        }

        @media (min-width: 1024px) {
            .breakpoint-demo {
                background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
            }

            .breakpoint-demo::before {
                content: "💻 Desktop (1024px - 1439px)";
            }
        }

        @media (min-width: 1440px) {
            .breakpoint-demo {
                background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
            }

            .breakpoint-demo::before {
                content: "🖥️ Large Desktop (≥ 1440px)";
            }
        }