/* Typography Animation Styles */
.typography-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.typography-animation.active {
    opacity: 1;
    visibility: visible;
}

.typography-container {
    text-align: center;
    color: white;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.teamwork-animation-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.word-animation-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    height: 60px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.word-animation-item.active {
    opacity: 1;
    transform: translateY(0);
}

.word-animation-item.animating .main-letter {
    animation: pulse 0.5s ease;
}

.main-letter {
    color: var(--letter-color) !important;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-width: 40px;
    text-align: center;
}

.prefix-text, .suffix-text {
    color: white !important;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.prefix-text {
    text-align: right;
}

.suffix-text {
    text-align: left;
}

.word-animation-item.animating .prefix-text,
.word-animation-item.animating .suffix-text {
    opacity: 1;
    transform: translateX(0);
}

.animation-controls {
    opacity: 0;
    animation: fadeIn 1s ease 12s forwards;
}

.skip-animation {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.skip-animation:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.show-typography-animation {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 10;
}

.show-typography-animation:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .teamwork-animation-container {
        gap: 0.8rem;
    }
    
    .word-animation-item {
        font-size: clamp(1.6rem, 6vw, 3rem);
        height: 50px;
    }
    
    .main-letter {
        min-width: 30px;
    }
}