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

:root {
    --dynamic-color: hsl(0, 0%, 37%);
    --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-duration: 0.6s;
}

.background-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#myVideo {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    object-fit: cover;
}

body {
    margin: 0;
    padding: 0;
    cursor: default;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    transition: filter 0.3s var(--transition-timing);
}

.content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateY(180deg); /* Start flipped on Y axis */
    transform-style: preserve-3d;
    transition: transform 1s ease, background-color 1s ease;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    width: 90%;
    background-color: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 2rem 4rem;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
    transition: all 0.3s var(--transition-timing), border-color 0.3s ease;
    animation: fadeIn 0.8s var(--transition-timing) forwards;
    backface-visibility: hidden;
}

.content.clicked::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: rgba(0, 0, 0, 0.4); /* Transparent background */
    border-radius: 15px;
    z-index: -1;
    opacity: 0.2;
    transition: opacity 0.3s var(--transition-timing),
                box-shadow 0.3s var(--transition-timing),
                transform 0.3s var(--transition-timing);
    backface-visibility: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); /* Dark shadow instead of blue */
}

.content.clicked {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3),
                inset 0 0 20px rgba(255, 255, 255, 0.2);
}

.content.playing {
    transform: translate(-50%, -50%) scale(1.02);
}

.content.playing::before {
    opacity: 0.4;
    box-shadow: 0 0 30px var(--dynamic-color);
}

@keyframes borderMove {
    0% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        opacity: 0.1;
    }
}

.secondary-text {
    color: white;
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.content:hover .secondary-text {
    opacity: 1;
    transform: translateY(0);
}

.logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    padding: 10px;
}

.logo-image {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(147, 51, 234, 0.5));
    transition: all 0.3s ease;
}

.logo-image:hover {
    filter: drop-shadow(0 0 15px rgba(147, 51, 234, 0.8));
    transform: scale(1.05);
}

.eye-container {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 100px; /* Adjusted height to fit counter */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eye {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.pupil {
    width: 20px;
    height: 20px;
    background: black;
    border-radius: 50%;
    position: absolute;
    top: 10px; /* Adjust to look top right */
    right: 10px; /* Adjust to look top right */
    transition: all 0.3s ease;
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

body {
    margin: 0;
    padding: 0;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeInBack {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-section {
    margin: 2rem 0;
    font-size: 1.2rem;
}

.intro-section p {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.about-section, .skills-section, .contact-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    transition: transform 0.2s ease-out;
    will-change: transform;
}

.about-section:hover, 
.skills-section:hover, 
.contact-section:hover {
    transform: translateY(-3px);
    transition: all 0.4s var(--transition-timing);
}

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

.skill-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem;
    border-radius: 5px;
    transition: all 0.4s var(--transition-timing);
    will-change: transform;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
    border: 1px solid var(--dynamic-color);
    box-shadow: 0 0 10px var(--dynamic-color);
}

.skill-item:hover {
    transform: scale(1.03);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid white;
    border-radius: 25px;
    transition: all 0.4s var(--transition-timing);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-color: var(--dynamic-color);
    background: transparent;
}

.social-link:hover {
    background: var(--dynamic-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
}

.cookie-notice {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(32, 34, 37, 0.98);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    max-width: 90%;
    width: 450px;
    display: none;
    animation: slideUp 0.5s ease-out;
}

.cookie-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-content p {
    margin: 0 0 15px 0;
    font-size: 0.95em;
    line-height: 1.5;
    color: #dcddde;
}

.cookie-details {
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.cookie-details small {
    color: #b9bbbe;
    font-size: 0.85em;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.cookie-btn.accept {
    background: #5865f2;
    color: white;
}

.cookie-btn.deny {
    background: rgba(255, 255, 255, 0.1);
    color: #dcddde;
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

.cookie-btn.accept:hover {
    background: #4752c4;
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
}

.cookie-btn.deny:hover {
    background: rgba(255, 255, 255, 0.15);
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .content {
        padding: 1.5rem;
        width: 85%;
    }
    
    .content:hover {
        transform: translate(-50%, -50%);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .about-section:hover, 
    .skills-section:hover, 
    .contact-section:hover {
        transform: none;
    }
    
    .audio-visualizer {
        bottom: 100px;
        width: 200px;
    }
    
    .visitor-counter {
        min-width: 120px;
    }
}

.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.music-button {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.music-button:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.music-icon {
    font-size: 1.5rem;
    color: white;
}

music-button.playing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Remove the audio visualizer */
.audio-visualizer {
    display: none;
}

@keyframes pullUp {
    0% {
        transform: translate(-50%, calc(-50% + 50px)) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        transform: translateX(-50%) translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

#audioCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    margin-bottom: 0;
    transform: rotate(-90deg);
}

.time-display {
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    text-align: center;
}

/* Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
}

.content, .visitor-counter, .audio-visualizer, .music-control {
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
    contain: layout style paint;
}

.visitor-counter {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.visitor-counter:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.visitor-counter p {
    margin: 0;
    font-size: 1.2em;
    color: #fff;
    text-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
}

.visitor-counter span {
    color: #5865f2;
    font-weight: bold;
    margin-left: 5px;
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

/* Animation für Zahlen */
@keyframes countUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.count-animation {
    animation: countUp 0.5s ease-out forwards;
}

.visitor-counter {
    margin-top: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: white;
    text-align: center;
}

/* Additional Breakpoints */
@media (min-width: 1920px) {
    .content {
        max-width: 1000px;
        font-size: 1.1em;
    }
    
    .audio-visualizer {
        width: 400px;
        bottom: 120px;
    }
}

@media (min-width: 2560px) {
    .content {
        max-width: 1200px;
        font-size: 1.2em;
    }
    
    .audio-visualizer {
        width: 500px;
        bottom: 150px;
    }
}

@media (max-width: 1024px) {
    .content {
        max-width: 700px;
        padding: 1.5rem 3rem;
    }
    
    .audio-visualizer {
        width: 250px;
        bottom: 80px;
    }
}

@media (max-width: 480px) {
    .content {
        width: 90%;
        padding: 1rem;
    }
    
    .audio-visualizer {
        width: 90%;
        bottom: 60px;
    }
    
    .logo-image {
        max-width: 150px;
    }
}

/* Reduce animation complexity on lower-end devices */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .content:hover {
        transform: none;
    }
    
    .content, .audio-visualizer {
        animation: none;
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes flipIn {
    0% {
        transform: translate(-50%, -50%) rotateY(180deg) scale(1);
    }
    100% {
        transform: translate(-50%, -50%) rotateY(0deg) scale(1);
    }
}