* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Animated Background */
.background {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    bottom: 10%;
    right: 10%;
    animation-delay: 5s;
}

.shape:nth-child(3) {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    animation: slideIn 0.8s ease-out;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar */
.container::-webkit-scrollbar {
    width: 8px;
}

.container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 10px;
}

.container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Container */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px 35px 30px 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: visible;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    gap: 8px;
    background: rgba(102, 126, 234, 0.1);
    padding: 5px;
    border-radius: 20px;
    z-index: 10;
}

.lang-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 15px;
    background: transparent;
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.lang-btn.active {
    color: white;
}

.lang-btn.active::before {
    opacity: 1;
}

.lang-btn:hover:not(.active) {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* Title */
.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    margin-top: 25px;
    animation: fadeInDown 0.6s ease-out 0.2s both;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotating-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: textRotate 0.6s ease-in-out;
    position: relative;
}

@keyframes textRotate {
    0% {
        opacity: 0;
        transform: translateY(-20px) rotateX(-90deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.rotating-text.fade-out {
    animation: textFadeOut 0.4s ease-in-out forwards;
}

@keyframes textFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px) rotateX(90deg);
    }
}

.subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out 0.4s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Groups */
.input-group {
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease-out both;
    position: relative;
}

.input-group:nth-child(1) {
    animation-delay: 0.5s;
}

.input-group:nth-child(2) {
    animation-delay: 0.6s;
}

.input-group:nth-child(3) {
    animation-delay: 0.7s;
}

.input-group:nth-child(4) {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.input-group input[type="text"],
.input-group input[type="tel"] {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    background: transparent;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-bottom-color: #667eea;
}

.input-group input:focus + .input-line {
    width: 100%;
}

.input-line {
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.4s ease;
    margin-top: -2px;
}

/* Radio Container */
.radio-container {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

.radio-item {
    position: relative;
}

.radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-item label {
    cursor: pointer;
    margin: 0;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.radio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.radio-item input[type="radio"]:checked + label .radio-card {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.radio-item input[type="radio"]:checked + label .radio-card::before {
    opacity: 0.1;
}

.radio-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.radio-icon {
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.radio-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.radio-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.radio-description {
    font-size: 0.85rem;
    color: #666;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 20px;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.submit-btn span {
    position: relative;
    z-index: 2;
}

.btn-shine {
    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 ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover .btn-shine {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* Success Message */
.success-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    text-align: center;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 10;
}

.success-message.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

.success-message h2 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 10px;
}

.success-message p {
    color: #666;
    font-size: 1rem;
}

form.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Amount Input with Currency */
.amount-suffix {
    position: absolute;
    right: 5px;
    bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-group input:focus + .input-line + .amount-suffix,
.input-group input:not(:placeholder-shown) + .input-line + .amount-suffix {
    opacity: 1;
}

/* Kaspi Info Block */
.kaspi-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(240, 92, 92, 0.1) 0%, rgba(241, 100, 30, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(240, 92, 92, 0.2);
    margin-top: 25px;
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease-out 0.9s both;
    position: relative;
    overflow: hidden;
}

.kaspi-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: kaspiShine 3s ease-in-out infinite;
}

@keyframes kaspiShine {
    0%, 100% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
}

.kaspi-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.kaspi-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.kaspi-text > span:first-child {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    background: linear-gradient(135deg, #f05c5c 0%, #f1641e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kaspi-months {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 10px;
        max-height: 98vh;
    }
    
    .form-container {
        padding: 30px 20px 20px 20px;
        border-radius: 20px;
    }
    
    .title {
        font-size: 1.8rem;
        margin-bottom: 8px;
        margin-top: 20px;
        min-height: 2.5rem;
    }
    
    .rotating-text {
        font-size: 1.8rem;
    }
    
    .language-switcher {
        top: 12px;
        right: 15px;
    }
    
    .subtitle {
        margin-bottom: 30px;
    }
    
    .input-group {
        margin-bottom: 20px;
    }
    
    .radio-container {
        gap: 10px;
    }
    
    .radio-card {
        padding: 15px;
    }
    
    .kaspi-info {
        padding: 15px;
        margin-top: 20px;
    }
}

