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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-button:hover {
    background: #667eea;
    color: white;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header .icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.header h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1rem;
}

.header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.card strong {
    color: #667eea;
}

.info-box {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.info-box p {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.info-box ul {
    list-style: disc;
    margin-left: 2rem;
    color: #666;
}

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

pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 2px solid #333;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.inline-code {
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
}

.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tag-item {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
}

.tag-item code {
    font-weight: bold;
    color: #667eea;
    font-size: 1rem;
}

.tag-item p {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.interactive-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.demo-section h3 {
    font-weight: bold;
    margin-bottom: 1rem;
    color: #333;
}

.result-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    min-height: 150px;
}

.result-box h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.result-box p {
    color: #666;
    margin-bottom: 1rem;
}

.result-box button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.result-box button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.success-message {
    color: #764ba2;
    font-weight: 600;
    margin-top: 1rem;
    display: none;
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.property-item {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
}

.property-item .prop-name {
    font-weight: bold;
    color: #667eea;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.property-item .prop-desc {
    font-size: 0.9rem;
    color: #666;
}

.demo-box {
    background: #f5f5f5;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1.5rem;
}

#colorBox {
    width: 200px;
    height: 200px;
    background: #667eea;
    margin: 1.5rem auto;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
}

.color-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.color-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.color-btn:hover {
    transform: scale(1.05);
}

.btn-blue { background: #667eea; }
.btn-purple { background: #764ba2; }
.btn-pink { background: #f093fb; }
.btn-green { background: #4facfe; }

.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.concept-item {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
}

.concept-item h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.concept-item p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.output {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    min-height: 60px;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.calculator {
    display: grid;
    gap: 1rem;
}

.calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.calc-display {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    font-size: 2rem;
    text-align: right;
    font-weight: bold;
    color: #333;
    grid-column: 1 / -1;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
}

.feature-item h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.feature-item p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.like-counter {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
}

.like-count {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1.5rem;
}

.like-button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.like-button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.todo-app {
    background: white;
    border-radius: 8px;
    padding: 2rem;
}

.todo-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.todo-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.todo-input:focus {
    outline: none;
    border-color: #667eea;
}

.todo-add-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.todo-add-button:hover {
    opacity: 0.9;
}

.todo-list {
    list-style: none;
}

.todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.todo-item.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.todo-text {
    flex: 1;
    color: #333;
}

.todo-buttons {
    display: flex;
    gap: 0.5rem;
}

.todo-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.complete-button {
    background: #4facfe;
    color: white;
}

.complete-button:hover {
    opacity: 0.8;
}

.delete-button {
    background: #f093fb;
    color: white;
}

.delete-button:hover {
    opacity: 0.8;
}

.cta-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
}

.cta-card h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary {
    background: white;
    color: #667eea;
}

.btn-secondary:hover {
    transform: scale(1.05);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: #667eea;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }

    .interactive-demo {
        grid-template-columns: 1fr;
    }
}

/* Fade-In + Fade-Out */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s forwards;
}

.fade-out {
    animation: fadeOut 0.6s forwards;
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
/* --- Page transitions (einfügen am Ende deiner CSS-Dateien) --- */
body.page-enter {
  animation: pageEnter 400ms ease-out forwards;
  /* optional: verbessert Rendering */
  will-change: opacity, transform;
}

body.page-exit {
  animation: pageExit 400ms ease-in forwards;
  will-change: opacity, transform;
}

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

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