* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #10b981;
    --accent: #f59e0b;
    --dark: #1e293b;
    --dark-light: #334155;
    --light: #f8fafc;
    --gray: #64748b;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>');
    animation: float 20s linear infinite;
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-100px); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.hero-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    font-size: 4rem;
    animation: floating 3s ease-in-out infinite;
    opacity: 0.2;
}

.floating-card:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.floating-card:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.section {
    padding: 6rem 0;
}

.section-dark {
    background: var(--dark);
    color: var(--white);
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

.section-intro {
    text-align: center;
    font-size: 1.3rem;
    color: var(--gray);
    margin-bottom: 4rem;
}

.section-dark .section-intro {
    color: rgba(255, 255, 255, 0.7);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.card p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.card ul, .card ol {
    margin-left: 1.5rem;
    color: var(--gray);
}

.card li {
    margin-bottom: 0.5rem;
}

.example-box {
    background: var(--light);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    border-left: 4px solid var(--primary);
}

.example-box code {
    font-family: 'Courier New', monospace;
    color: var(--primary);
    font-weight: 600;
}

kbd {
    background: var(--dark);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-family: monospace;
}

/* Function Cards */
.function-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.function-card {
    background: var(--dark-light);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.function-card:hover {
    border-color: var(--primary);
    transform: translateX(10px);
}

.highlight-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.function-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.function-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
    font-family: 'Courier New', monospace;
}

.function-badge {
    background: var(--primary);
    color: var(--white);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.function-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.code-block {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    border-left: 4px solid var(--secondary);
}

.code-block code {
    color: #fbbf24;
    font-size: 1.1rem;
}

.code-comment {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.tip-box, .warning-box {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.tip-box {
    background: rgba(16, 185, 129, 0.2);
    border-left: 4px solid var(--secondary);
}

.warning-box {
    background: rgba(245, 158, 11, 0.2);
    border-left: 4px solid var(--accent);
}

.formula-explanation {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.comparison-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.comparison-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.formula-structure {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.formula-structure h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

.structure-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.structure-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
}

.structure-label {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
    min-width: 150px;
}

.structure-desc {
    color: var(--gray);
}

/* Shortcuts Section */
.section-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.shortcuts-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.shortcut-category {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.category-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.shortcut-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--secondary);
    transition: all 0.3s;
}

.shortcut-item:hover {
    transform: translateX(10px);
    background: rgba(0, 0, 0, 0.4);
    border-left-color: #fbbf24;
}

.highlight-shortcut {
    background: rgba(16, 185, 129, 0.3);
    border-left-color: #fbbf24;
    border-left-width: 6px;
}

.highlight-shortcut:hover {
    background: rgba(16, 185, 129, 0.4);
}

.shortcut-keys {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.shortcut-keys kbd {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', monospace;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-width: 45px;
    text-align: center;
}

.shortcut-desc {
    font-size: 1.05rem;
    opacity: 0.95;
    line-height: 1.5;
}

.shortcut-tip-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 25px;
    margin-top: 3rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.shortcut-tip-box h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.top-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.top-shortcut {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    transition: all 0.3s;
}

.top-shortcut:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.4);
}

.top-shortcut .number {
    background: var(--accent);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
}

.top-shortcut kbd {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.top-shortcut span:last-child {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tip-card {
    background: var(--dark-light);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.tip-card:hover {
    transform: scale(1.05);
    border-color: var(--secondary);
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tip-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.tip-card p {
    opacity: 0.9;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.resource-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.resource-type {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.resource-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.resource-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.resource-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.resource-link:hover {
    transform: translateX(5px);
}

/* Practice Section */
.practice-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
}

.practice-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.practice-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.practice-checklist {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.practice-checklist label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s;
}

.practice-checklist label:hover {
    background: rgba(255, 255, 255, 0.2);
}

.practice-checklist input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-note {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 4rem 1rem;
        min-height: 80vh;
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-intro {
        font-size: 1rem;
    }
    
    .navbar {
        padding: 0.8rem 0;
    }

    .logo {
        font-size: 1.2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .cards-grid,
    .tips-grid,
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card,
    .tip-card,
    .resource-card {
        padding: 1.5rem;
    }

    .function-card {
        padding: 1.5rem;
    }

    .function-name {
        font-size: 1.3rem;
    }

    .code-block {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        overflow-x: auto;
    }

    .code-block code {
        font-size: 0.9rem;
    }

    /* Shortcuts Mobile */
    .shortcut-category {
        padding: 1.5rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .shortcuts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .shortcut-item {
        padding: 1rem;
    }

    .shortcut-keys kbd {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 35px;
    }

    .shortcut-desc {
        font-size: 0.95rem;
    }

    .shortcut-tip-box {
        padding: 1.5rem;
    }

    .shortcut-tip-box h3 {
        font-size: 1.3rem;
    }

    .top-shortcuts {
        grid-template-columns: 1fr;
    }

    .top-shortcut {
        padding: 1rem;
    }

    /* Formula Structure Mobile */
    .formula-structure {
        padding: 1.5rem;
    }

    .structure-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .structure-label {
        min-width: auto;
        font-size: 1rem;
    }

    /* Comparison Grid Mobile */
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    /* Practice Section Mobile */
    .practice-section {
        padding: 2rem 1rem;
    }

    .practice-section h2 {
        font-size: 1.8rem;
    }

    .practice-section p {
        font-size: 1rem;
    }

    .practice-checklist {
        padding: 0 1rem;
    }

    .practice-checklist label {
        font-size: 1rem;
        padding: 0.8rem;
    }

    /* Footer Mobile */
    .footer {
        padding: 2rem 0;
        font-size: 0.9rem;
    }

    /* Floating Cards - kleiner auf Mobile */
    .floating-card {
        font-size: 2rem;
    }

    /* Touch-friendly buttons */
    .cta-button,
    .resource-link,
    .shortcut-item {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card-icon,
    .tip-icon {
        font-size: 2rem;
    }

    kbd {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .shortcut-keys {
        gap: 0.3rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--white);
}
