/* Prediction cards hover effect */
.prediction-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.prediction-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(25, 122, 220, 0.5);
}

.prediction-card:active {
    transform: scale(0.97);
}

/* Letter textarea — always inline with button */
#letter-message {
    width: 100%;
    height: 60px;
    min-height: 60px;
    background: #000;
    color: #fff;
    border: 1px solid #333;
    border-radius: 8px 0 0 8px;
    padding: 0 15px;
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    line-height: 60px;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
    overflow: hidden;
}

@media (max-width: 640px) {
    #letter-message {
        height: 50px;
        min-height: 50px;
        line-height: 50px;
        font-size: 14px;
        padding: 0 12px;
        border: none;
        border-radius: 8px 0 0 8px;
    }
}

#letter-message::placeholder {
    color: var(--grey);
}

#letter-message:focus {
    border-color: var(--main);
}

/* Char counter */
#char-count {
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: var(--grey);
    transition: color 0.3s ease;
}

/* Submit button — always inline with textarea */
.submit-btn {
    background: var(--main);
    color: #fff;
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 14px;
    height: 60px;
    padding: 0 30px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .submit-btn {
        height: 50px;
        padding: 0 20px;
        font-size: 13px;
        border-radius: 0 5px 5px 0;
    }
}

.submit-btn:hover {
    opacity: 0.9;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Telegram button */
.tg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #1bb1f0;
    border-radius: 50%;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.tg-btn:hover {
    opacity: 0.85;
}

/* Section background */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Footer links */
.footer-link {
    color: var(--grey);
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    line-height: 140%;
    transition: color 0.2s ease;
    cursor: pointer;
}

.footer-link:hover {
    color: #fff;
}

/* Badge */
.info-badge {
    background: rgba(25, 122, 220, 0.4);
    border-radius: 4px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 12px;
        align-items: flex-start;
        padding-top: 40px;
    }
}

/* Copy prediction button */
.copy-prediction-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-prediction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.copy-prediction-btn:hover svg rect,
.copy-prediction-btn:hover svg path {
    stroke: #197adc;
}

.modal-box {
    background: #1c1e20;
    border-radius: 10px;
    padding: 60px;
    max-width: 500px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 640px) {
    .modal-box {
        padding: 60px 20px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-box {
        padding: 60px 16px;
        border-radius: 8px;
    }
}

/* Custom checkbox */
.modal-checkbox {
    flex-shrink: 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.modal-checkbox svg {
    display: block;
}

.modal-checkbox .checkbox-border,
.modal-checkbox .checkbox-fill,
.modal-checkbox .checkbox-check {
    transition: opacity 0.2s ease;
}

.modal-checkbox:hover .checkbox-border {
    stroke: #197adc;
}

.div-policy-link {
    color: #197adc;
    cursor: pointer;
}

/* 3D Flip card animation */
.flip-container {
    perspective: 1000px;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.flip-card {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.flip-card.flipped {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.flip-front {
    background: #000;
}

.flip-front img,
.flip-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.flip-back {
    background: transparent;
    transform: rotateY(180deg);
}

/* Fade-in for prediction details after flip */
.prediction-details {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.prediction-details.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 640px) {
    .flip-container {
        width: 170px;
        height: 170px;
    }
}

@media (max-width: 380px) {
    .flip-container {
        width: 150px;
        height: 150px;
    }
}

/* Card grid responsive */
.card-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (max-width: 380px) {
    .card-grid {
        gap: 8px;
    }
}
