/* ============================================
   PYTHON EXPLOSION SECTION - KOODI STYLE
   Додати в head: <link rel="stylesheet" href="python-explosion.css">
   ============================================ */

.python-explosion-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    padding: 100px 20px;
}

/* ===== КОНФЕТІ (KOODI SQUARES) ===== */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.koodi-confetti {
    position: absolute;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none;
}

/* ===== ЦЕНТРАЛЬНЕ ЛОГО — БІЛЬШЕ ===== */
.explosion-center {
    position: relative;
    z-index: 10;
    margin-bottom: 50px;
}

.python-logo-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: transform 0.3s ease;
}

.python-logo-wrapper:hover {
    transform: scale(1.1);
}

.python-main-logo {
    width: 260px;
    height: 260px;
    filter: drop-shadow(0 0 60px rgba(55, 118, 171, 0.8));
    transition: all 0.5s ease;
    position: relative;
    z-index: 2;
}

.python-logo-wrapper.shake .python-main-logo {
    animation: logo-shake 0.6s ease;
}

.python-logo-wrapper:hover .python-main-logo {
    filter: drop-shadow(0 0 80px rgba(55, 118, 171, 1)) drop-shadow(0 0 120px rgba(255, 159, 0, 0.5));
}

.logo-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(55, 118, 171, 0.4) 0%, rgba(255, 159, 0, 0.2) 40%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

@keyframes logo-shake {
    0%, 100% { transform: translateX(0) rotate(0) scale(1); }
    10% { transform: translateX(-10px) rotate(-4deg) scale(1.03); }
    20% { transform: translateX(10px) rotate(4deg) scale(1.06); }
    30% { transform: translateX(-8px) rotate(-3deg) scale(1.09); }
    40% { transform: translateX(8px) rotate(3deg) scale(1.12); }
    50% { transform: translateX(-5px) rotate(-2deg) scale(1.15); }
    60% { transform: translateX(5px) rotate(2deg) scale(1.12); }
    70% { transform: translateX(-3px) rotate(-1deg) scale(1.08); }
    80% { transform: translateX(3px) rotate(0) scale(1.04); }
    90% { transform: translateX(-1px) rotate(0) scale(1); }
}

/* ===== КУБИКИ — БІЛЬШІ ===== */
.explosion-cubes {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.explosion-cube {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 170px;
    height: 170px;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
}

.explosion-cube.exploded {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    cursor: grab;
}

/* Стилі кубика — БІЛЬШ ВИДИМІ */
.cube-front {
    width: 100%;
    height: 100%;
    background: rgba(25, 25, 30, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 4px solid;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Koodi кольори — ЯСКРАВІ GLOW */
.explosion-cube[data-color="pink"] .cube-front { 
    border-color: #FF4E99; 
    box-shadow: 0 0 30px rgba(255, 78, 153, 0.5), 0 15px 50px rgba(0, 0, 0, 0.3);
}
.explosion-cube[data-color="orange"] .cube-front { 
    border-color: #FF9F00; 
    box-shadow: 0 0 30px rgba(255, 159, 0, 0.5), 0 15px 50px rgba(0, 0, 0, 0.3);
}
.explosion-cube[data-color="lime"] .cube-front { 
    border-color: #C6DF2B; 
    box-shadow: 0 0 30px rgba(198, 223, 43, 0.5), 0 15px 50px rgba(0, 0, 0, 0.3);
}
.explosion-cube[data-color="blue"] .cube-front { 
    border-color: #009DFF; 
    box-shadow: 0 0 30px rgba(0, 157, 255, 0.5), 0 15px 50px rgba(0, 0, 0, 0.3);
}

/* Hover — СУПЕР ЯСКРАВО */
.explosion-cube[data-color="pink"]:hover .cube-front { 
    border-color: #FF4E99; 
    box-shadow: 0 0 60px rgba(255, 78, 153, 0.8), 0 20px 60px rgba(0, 0, 0, 0.4);
    background: rgba(255, 78, 153, 0.2);
}
.explosion-cube[data-color="orange"]:hover .cube-front { 
    border-color: #FF9F00; 
    box-shadow: 0 0 60px rgba(255, 159, 0, 0.8), 0 20px 60px rgba(0, 0, 0, 0.4);
    background: rgba(255, 159, 0, 0.2);
}
.explosion-cube[data-color="lime"]:hover .cube-front { 
    border-color: #C6DF2B; 
    box-shadow: 0 0 60px rgba(198, 223, 43, 0.8), 0 20px 60px rgba(0, 0, 0, 0.4);
    background: rgba(198, 223, 43, 0.2);
}
.explosion-cube[data-color="blue"]:hover .cube-front { 
    border-color: #009DFF; 
    box-shadow: 0 0 60px rgba(0, 157, 255, 0.8), 0 20px 60px rgba(0, 0, 0, 0.4);
    background: rgba(0, 157, 255, 0.2);
}

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

.explosion-cube:hover .cube-front::before {
    left: 100%;
}

.explosion-cube:hover .cube-front {
    transform: translateY(-12px) scale(1.1);
}

.cube-icon {
    font-size: 56px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.cube-title {
    font-family: 'Rubik', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Tooltip — ЗНИЗУ */
.cube-tooltip {
    position: absolute;
    top: calc(100% + 22px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 280px;
    padding: 22px;
    background: rgba(25, 25, 30, 0.97);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 18px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    border: 3px solid;
}

.explosion-cube[data-color="pink"] .cube-tooltip { 
    border-color: #FF4E99; 
    box-shadow: 0 0 40px rgba(255, 78, 153, 0.5);
}
.explosion-cube[data-color="orange"] .cube-tooltip { 
    border-color: #FF9F00; 
    box-shadow: 0 0 40px rgba(255, 159, 0, 0.5);
}
.explosion-cube[data-color="lime"] .cube-tooltip { 
    border-color: #C6DF2B; 
    box-shadow: 0 0 40px rgba(198, 223, 43, 0.5);
}
.explosion-cube[data-color="blue"] .cube-tooltip { 
    border-color: #009DFF; 
    box-shadow: 0 0 40px rgba(0, 157, 255, 0.5);
}

/* Стрілочка ЗВЕРХУ tooltip */
.cube-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 14px solid transparent;
    border-bottom-color: rgba(25, 25, 30, 0.97);
}

.explosion-cube:hover .cube-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.cube-tooltip h4 {
    font-family: 'Rubik', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
}

.cube-tooltip p {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.6;
}

/* ===== ТЕКСТ — ТЕМНИЙ для світлого фону ===== */
.explosion-text {
    position: relative;
    z-index: 10;
    text-align: center;
    margin-top: -30px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.5s;
}

.explosion-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.explosion-text h2 {
    font-family: 'Rubik', sans-serif;
    font-size: 48px;
    font-weight: 800;
    /* ТЕМНИЙ ТЕКСТ */
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.gradient-text {
    /* Простий яскравий помаранчевий колір */
    color: #FF9F00;
}

.explosion-text p {
    font-family: 'Rubik', sans-serif;
    font-size: 18px;
    /* ТЕМНИЙ ТЕКСТ */
    color: #555;
    margin: 0;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1200px) {
    .explosion-cube {
        width: 150px;
        height: 150px;
    }
    .cube-icon { font-size: 48px; }
    .cube-title { font-size: 13px; }
    
    .python-main-logo {
        width: 220px;
        height: 220px;
    }
    .python-logo-wrapper {
        width: 280px;
        height: 280px;
    }
    .logo-glow {
        width: 320px;
        height: 320px;
    }
}

@media (max-width: 900px) {
    .python-explosion-section {
        min-height: auto;
        padding: 60px 15px;
    }
    
    .explosion-cubes {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 30px 10px;
        max-width: 340px;
        margin: 0 auto;
    }
    
    .explosion-cube {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100%;
        height: 140px;
        opacity: 0;
        visibility: hidden;
        transform: scale(0.8) !important;
        transition: all 0.5s ease !important;
    }
    
    .explosion-cube.exploded {
        opacity: 1 !important;
        visibility: visible !important;
        transform: scale(1) !important;
    }
    
    .explosion-cube:hover .cube-front {
        transform: translateY(-5px) scale(1.03);
    }
    
    .cube-tooltip {
        display: none;
    }
    
    .python-main-logo {
        width: 160px;
        height: 160px;
    }
    
    .python-logo-wrapper {
        width: 200px;
        height: 200px;
    }
    
    .logo-glow {
        width: 230px;
        height: 230px;
    }
    
    .explosion-text h2 {
        font-size: 32px;
    }
    
    .explosion-text {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .explosion-cubes {
        gap: 14px;
        max-width: 300px;
    }
    
    .explosion-cube {
        height: 120px;
    }
    
    .cube-icon { font-size: 36px; }
    .cube-title { font-size: 11px; }
    
    .explosion-text h2 { font-size: 26px; }
    
    .python-main-logo {
        width: 130px;
        height: 130px;
    }
}