@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #0a0a0a;
    --secondary-color: #ffffff;
    --accent-color: #9b59b6; /* Lila */
    --text-color: #333;
    --background-color: #f4f4f4;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    background: white;
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: top 0.4s ease-in-out, background-color 0.3s ease, padding 0.3s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--primary-color);
    background: var(--secondary-color);
}

#hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--secondary-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
    background-color: #7d3c98; /* dunkleres Lila */
    transform: translateY(-3px);
}

/* Projekte */
section {
    padding: 6rem 0;
}

h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.projekt-raster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.projekt-karte {
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projekt-karte:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.projekt-bild {
    height: 200px;
    background-color: #ddd;
}

.projekt-karte h3 {
    padding: 1.5rem 1.5rem 0.5rem;
}

.projekt-karte p {
    padding: 0 1.5rem;
    flex-grow: 1;
}

.projekt-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.projekt-link:hover {
    color: #7d3c98;
}

/* Über mich & Kontakt */
#ueber-mich, #kontakt {
    text-align: center;
    max-width: 1440px;
    margin: 0 auto;
}

#kontakt {
    background-color: var(--secondary-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
}

/* Animationen */
.fade-in {
    animation: fadeIn 1.5s ease-in-out;
}

.slide-in {
    animation: slideIn 1s forwards;
    opacity: 0;
}

.slide-in-delay {
    animation: slideIn 1s 0.2s forwards;
    opacity: 0;
}
.slide-in-delay-2 {
    animation: slideIn 1s 0.4s forwards;
    opacity: 0;
}

/* Stil für den neuen Game-Button */
.btn-game {
    background-color: var(--accent-color);
    color: var(--secondary-color) !important;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-game:hover {
    color: var(--secondary-color) !important;
    background-color: #7d3c98;
    transform: translateY(-2px);
}

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

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

/* -----------------------------
   MyWorld - Rotierende Weltkugel
   ----------------------------- */
.myworld-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.globe {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background-image: url('837C7681-1AAD-4F64-BED0-5F29061F4412.png');
    background-size: cover;
    background-position: center;
    box-shadow: 0 12px 30px rgba(10,10,10,0.25), inset 0 -8px 20px rgba(0,0,0,0.15);
    transform-style: preserve-3d;
    transform: rotateX(18deg) rotateZ(0deg);
    animation: globe-spin 18s linear infinite;
    transition: transform 0.35s ease, box-shadow 0.25s ease;
    cursor: default;
    border: 6px solid rgba(255,255,255,0.02);
}

.globe .gloss {
    position: absolute;
    inset: 0;
    background: radial-gradient(120px 80px at 30% 20%, rgba(255,255,255,0.12), transparent 20%),
                linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.globe:hover {
    animation-play-state: running;
    animation-duration: 8s;
    transform: rotateX(18deg) rotateZ(0deg) translateY(-6px) scale(1.02);
    box-shadow: 0 18px 40px rgba(10,10,10,0.32), inset 0 -10px 26px rgba(0,0,0,0.18);
}

.globe:hover {
    animation: globe-spin-fast 8s linear infinite;
}

.myworld-text {
    text-align: center;
    max-width: 720px;
    color: var(--text-color);
}

@keyframes globe-spin {
    from { transform: rotateX(18deg) rotateY(0deg); }
    to   { transform: rotateX(18deg) rotateY(360deg); }
}

@keyframes globe-spin-fast {
    from { transform: rotateX(18deg) rotateY(0deg); }
    to   { transform: rotateX(18deg) rotateY(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .globe {
        animation: none;
        transform: rotateX(18deg) rotateY(0deg);
    }
    .globe:hover {
        transform: rotateX(18deg);
        animation: none;
    }
}

@media (max-width: 520px) {
    .globe {
        width: 200px;
        height: 200px;
    }
}

.earth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
}

.earth {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: url('world.png') repeat-x;
  background-size: cover;
  box-shadow: inset -20px 0 40px rgba(0,0,0,0.3),
              0 0 20px rgba(0,0,0,0.3);
  animation: spin 20s linear infinite;
  transform-style: preserve-3d;
  margin: auto;
}

@keyframes spin {
  from { background-position: 0 0; }
  to   { background-position: -1000px 0; }
}
