
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(./1.jpg);
    font-family: 'Segoe UI', Arial, sans-serif;
}

.container {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
}

.ball {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #8f36a6, #0d0d1a);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 8),
        inset 0 -20px 40px rgba(0, 0, 0, 0.6),
        inset 0 10px 30px rgba(37, 37, 66, 0.658);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s ease;
    position: relative;
    user-select: none;

}

.ball:active {
    transform: scale(0.95);
}
/*блик на шаре */
.ball::before{
    content: '';
    position: absolute;
    top: 25px;
    left: 40px;
    width: 150px;
    height: 40px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: rotate(-30deg);
    pointer-events: none;
}

.triangle {
    width: 220px;
    height: 170px;
    background: #5959ac;
    clip-path: polygon(50% 100%, 100% 0%, 0% 0%);
    display: flex;
    justify-content: center;
    /**align-items: center;**/
    position: relative;
    box-shadow: inset 0 0 30px rgba(171, 171, 240, 0.2);
}
/* светяшка у треугольника */
.triangle::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, #c19fe6, #a37bec, #9b9be9);
    clip-path: polygon(50% 100%, 100% 0%, 0% 0%);
    z-index: -1;
    opacity: 0.5;
    filter: blur(4px);
}
/*предсказание*/
#prediction {
    color: #c8d0ff;
    font-size: 17px;
    font-weight: bold;
    margin-top: 25px;
    text-align: center;
    padding: 10px;
    text-shadow: 0 0 15px rgba(152, 114, 240, 0.5);
    transition: opacity 0.3s ease;
    line-height: 1.3;
    word-break: break-word;
    max-width: 150px;
}
/*кнопка и ввод*/
.controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

#questionInput {
    padding: 12px 20px;
    border-radius: 30px;
    border: 2px solid #af40cb;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    width: 260px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#questionInput:focus {
    border-color: #8a4aff;
    box-shadow: 0 0 20px rgba(137, 74, 255, 0.3);
}

#questionInput::placeholder {
    color: #8888aa;
}

#shakeBtn{
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #af40cb, #8a4aff);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(74, 74, 255, 0.4);
}

#shakeBtn:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(137, 74, 255, 0.6);
}

#shakeBtn:active{
    transform: scale(0.95);
}

/*причина тряски?*/
@keyframes shake {
    0% {transform: rotate(0deg) scale(1);}
    15% {transform: rotate(20deg) scale(1.05);}
    30% {transform: rotate(-20deg) scale(1.05);}
    45% {transform: rotate(15deg) scale(1.03);}
    60% {transform: rotate(8deg) scale(1.01);}
    75% {transform: rotate(-8deg) scale(1.01);}
    100% {transform: rotate(0deg) scale(1);}
}

.shake {
    animation: shake 0.6s ease-in-out;
}

/*Затемнение при тряске*/
.fade-text {
    opacity: 0.2 !important;
}

/*Адаптив*/
@media (max-width: 500px) {
    .ball {
        width: 270px;
        height: 270px;
    }
    .triangle {
        width: 155px;
        height: 105px;
    }
    #prediction {
        margin-top: 5px;
        font-size: 14px;
        max-width: 115px;
    }
    #questionInput {
        width: 180px;
    }
    .ball::before{
    top: 12px;
    left: 18px;
    width: 100px;
    height: 30px;
    }
    #shakeBtn{
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 16px;
    }
}

@media (max-width: 280px) {
    .ball {
        width: 210px;
        height: 210px;
    }
    .triangle {
        width: 130px;
        height: 95px;
    }
    #prediction {
        margin-top: 5px;
        font-size: 11px;
        max-width: 102px;
    }
    #questionInput {
        width: 150px;
    }
    .ball::before{
    top: 12px;
    left: 18px;
    width: 100px;
    height: 30px;
    }
    #shakeBtn{
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 16px;
    }
}

.sect {
    max-width: 700px;
            margin: 40px auto 20px;
            padding: 30px 25px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 20px;
            border: 1px solid rgba(74, 74, 255, 0.15);
            backdrop-filter: blur(5px);
            color: #c8d0ff;
            font-family: 'Segoe UI', Arial, sans-serif;
            line-height: 1.7;
}

h2 {
    color: #8a8aff;
        font-size: 24px;
        margin-bottom: 15px;
        text-align: center;
        text-shadow: 0 0 30px rgba(74, 74, 255, 0.3);
}

footer {
    margin-top: 20px;
    color: #666;
    font-size: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.contacts {
    display: flex;
    margin-top: 20px; 
    text-align: center; 
    color: #888;
}

.menu{
    position: fixed;
    display: inline;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: space-between;
    top: 0;
    left: 25%;
    right: 25%;
    z-index: 9999;
}
.menu a {
  float: left;
  color: #c19fe6;
  text-align: center;
  padding: 10px 0px;
  margin-right: 25px;
  text-decoration: none;
  font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: 0 4px 15px rgba(74, 74, 255, 0.4);
    cursor: pointer;
}
.menu a:hover{
    transform: translateY(-2px);
    text-shadow: 10px 10px 25px rgba(137, 74, 255, 0.6);
}

    @media (max-width: 520px) {
.menu {
        left: 0%;
        right: 0%;
        width: 100%;
        justify-content: center;
      }
      .menu a {
        font-size: 14px;
        margin-right: 10px;

      }
    }

    @media (max-width: 330px) {
       .card {
        margin-top: 80px;
      }
      .menu {
        left: 0%;
        right: 0%;
        width: 100%;
      }
      .menu a {
        font-size: 10px;
        margin-right: 10px;
        
      }

    }
