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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.title {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease-out;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInDown 1s ease-out 0.2s backwards;
}

.pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 40px auto;
    perspective: 1000px;
}

.pyramid-level {
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.6s ease-out backwards;
    overflow: hidden;
}

.pyramid-level::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.pyramid-level:hover::before {
    left: 100%;
}

.level-1 {
    width: 90%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    animation-delay: 0.1s;
}

.level-2 {
    width: 80%;
    background: linear-gradient(135deg, #ff8c42, #ff9a56);
    animation-delay: 0.2s;
}

.level-3 {
    width: 70%;
    background: linear-gradient(135deg, #ffd93d, #ffdf5d);
    animation-delay: 0.3s;
}

.level-4 {
    width: 60%;
    background: linear-gradient(135deg, #ffeb3b, #fff176);
    animation-delay: 0.4s;
}

.level-5 {
    width: 50%;
    background: linear-gradient(135deg, #a8e063, #b8e986);
    animation-delay: 0.5s;
}

.level-6 {
    width: 40%;
    background: linear-gradient(135deg, #56cc9d, #6dd5b4);
    animation-delay: 0.6s;
}

.level-7 {
    width: 30%;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    animation-delay: 0.7s;
}

.level-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 30px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.method {
    font-size: 1.2rem;
}

.percentage {
    font-size: 1.4rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
}

.tooltip {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(0, 0, 0, 0.9);
}

.pyramid-level:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.pyramid-level:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.info-box {
    margin-top: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

.info-box p {
    margin: 10px 0;
    font-size: 1rem;
}

.note {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .pyramid-level {
        height: 60px;
    }

    .level-content {
        padding: 0 15px;
        font-size: 0.9rem;
    }

    .method {
        font-size: 1rem;
    }

    .percentage {
        font-size: 1.1rem;
        padding: 4px 10px;
    }

    .tooltip {
        font-size: 0.8rem;
        white-space: normal;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }

    .pyramid-level {
        height: 50px;
    }

    .level-content {
        flex-direction: column;
        gap: 5px;
        padding: 5px;
    }

    .method {
        font-size: 0.85rem;
    }

    .percentage {
        font-size: 0.9rem;
    }
}
