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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #2c3e50;
    overflow-x: hidden;
    position: relative;
}

/* Clean Background Elements */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.soft-waves {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 182, 193, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 192, 203, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 218, 224, 0.15) 0%, transparent 50%);
    animation: gentle-float 20s ease-in-out infinite;
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 182, 193, 0.4);
    border-radius: 50%;
    animation: float-particle 15s linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Decorative Elements */
.decorative-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.decorative-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 182, 193, 0.3);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    border-width: 2px;
    animation: pulse 8s ease-in-out infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: 15%;
    right: 10%;
    border-width: 1px;
    animation: pulse 8s ease-in-out infinite reverse;
}

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

.decorative-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(255, 182, 193, 0.3), transparent);
    height: 1px;
}

.line-1 {
    width: 80%;
    top: 30%;
    left: 10%;
    animation: fade 10s ease-in-out infinite;
}

.line-2 {
    width: 60%;
    bottom: 40%;
    right: 10%;
    animation: fade 10s ease-in-out infinite reverse;
}

@keyframes fade {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

/* Background Hearts */
.background-hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.background-heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #FFB6C1; /* Baby pink */
    transform: rotate(45deg);
    opacity: 0.4;
    animation: float-background-heart 15s linear infinite;
}

.background-heart:before,
.background-heart:after {
    content: '';
    width: 20px;
    height: 20px;
    background-color: #FFB6C1;
    border-radius: 50%;
    position: absolute;
}

.background-heart:before {
    top: -10px;
    left: 0;
}

.background-heart:after {
    top: 0;
    left: -10px;
}

@keyframes float-background-heart {
    0% {
        transform: rotate(45deg) translateY(100vh);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: rotate(45deg) translateY(-100px) translateX(var(--drift, 20px));
        opacity: 0;
    }
}

/* Hearts that appear when playing */
.playing-hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.playing-heart {
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: #FFB6C1; /* Baby pink */
    transform: rotate(45deg);
    opacity: 0;
    animation: float-playing-heart 4s ease-out forwards;
    filter: drop-shadow(0 0 5px rgba(255, 182, 193, 0.7));
}

.playing-heart:before,
.playing-heart:after {
    content: '';
    width: 25px;
    height: 25px;
    background-color: #FFB6C1;
    border-radius: 50%;
    position: absolute;
}

.playing-heart:before {
    top: -12.5px;
    left: 0;
}

.playing-heart:after {
    top: 0;
    left: -12.5px;
}

@keyframes float-playing-heart {
    0% {
        transform: rotate(45deg) translateY(0) scale(0.2);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
        transform: rotate(45deg) translateY(0) scale(1);
    }
    100% {
        transform: rotate(45deg) translateY(-200px) translateX(var(--drift, 0px)) scale(0.5);
        opacity: 0;
    }
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    z-index: 1;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 3rem;
    font-weight: 300;
    color: #2c3e50;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.instructions {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1rem;
    color: #5a6c7d;
    line-height: 1.8;
    font-weight: 300;
}

.piano-container {
    overflow-x: auto;
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.piano {
    display: flex;
    position: relative;
    margin: 40px auto;
    height: 200px;
    min-width: max-content;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

.key {
    position: relative;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.white-key {
    width: 60px;
    height: 200px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 0 0 8px 8px;
    color: #6c757d;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
    font-weight: 500;
    font-size: 13px;
    z-index: 1;
    margin: 0 1px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.white-key:hover {
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.black-key {
    width: 40px;
    height: 130px;
    background: linear-gradient(to bottom, #343a40 0%, #212529 100%);
    border: 1px solid #000;
    border-radius: 0 0 6px 6px;
    position: absolute;
    z-index: 2;
    color: #adb5bd;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    font-weight: 500;
    font-size: 11px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.black-key:hover {
    background: linear-gradient(to bottom, #495057 0%, #343a40 100%);
    transform: translateY(1px);
}

.white-key.active {
    background: linear-gradient(to bottom, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(3px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.black-key.active {
    background: linear-gradient(to bottom, #212529 0%, #000000 100%);
    transform: translateY(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.controls {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.9);
    color: #495057;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #343a40;
}

.control-btn:active {
    transform: translateY(0);
}

.creator-credit {
    text-align: center;
    margin-top: 40px;
    font-size: 1rem;
    color: #6c757d;
    font-weight: 300;
    padding: 20px;
}

.creator-name {
    font-weight: 500;
    color: #FFB6C1;
    padding: 0 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .piano {
        transform: scale(0.8);
        margin: 20px auto;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .instructions {
        font-size: 0.9rem;
    }
    
    .container {
        padding: 30px 15px;
        margin: 10px;
    }
}

@media (max-width: 576px) {
    .piano {
        transform: scale(0.6);
        margin: 10px auto;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .instructions {
        font-size: 0.85rem;
    }
    
    .container {
        padding: 20px 10px;
        margin: 5px;
    }
}

.hide-label {
    color: transparent !important;
}

/* Subtle ripple effect when keys are pressed */
@keyframes ripple {
    0% { 
        transform: scale(0);
        opacity: 0.6;
    }
    100% { 
        transform: scale(1);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 182, 193, 0.3);
    pointer-events: none;
    animation: ripple 0.6s ease-out forwards;
}
