
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.4;
    min-height: 100vh;
}
.container {
    max-width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}
.header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(44,82,130,0.15);
    border-bottom: 1px solid #e2e8f0;
}
.secondary-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: rgba(248,250,252,0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #cbd5e0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.secondary-header::-webkit-scrollbar {
    display: none;
}
.train-brands-header {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    justify-content: center;
    padding: 0;
}
.train-brand-header {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    flex: 1;
    text-align: center;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.train-brand-text {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.train-brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
.train-brand-header:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}
.logo {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    animation: trainSway 3s ease-in-out infinite;
}
@keyframes trainSway {
    0%, 100% {
        transform: translateX(0px) rotate(0deg);
    }
    25% {
        transform: translateX(1px) rotate(0.5deg);
    }
    50% {
        transform: translateX(0px) rotate(0deg);
    }
    75% {
        transform: translateX(-1px) rotate(-0.5deg);
    }
}
.brand-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c5282;
    flex: 1;
}
.rating {
    display: flex;
    align-items: center;
    font-size: 12px;
}
.rating-stars {
    margin-right: 4px;
    color: #f59e0b;
}
.rating span:last-child {
    color: #718096;
}
.hero {
    text-align: center;
    padding: 20px 15px;
    background: rgba(255,255,255,0.98);
    margin: 15px;
    border-radius: 20px;
    border: 2px solid #dbeafe;
    box-shadow: 0 4px 25px rgba(30,58,138,0.12);
    animation: fadeInUp 0.6s ease-out;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.hero h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 10px;
}
.hero p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.4;
}
.form-group {
    margin-bottom: 15px;
    text-align: left;
}
.train-input-group {
    margin-bottom: 15px;
}
.train-label {
    color: #1e40af;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    text-align: left;
}
.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
    transition: all 0.3s ease;
    color: #1e40af;
    font-weight: 500;
}
.input-field::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    background: #fefefe;
}
.date-input-wrapper {
    position: relative;
}
.date-input-wrapper .input-field {
    text-align: center;
    position: relative;
    padding-right: 45px;
}
.calendar-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4299e1;
    z-index: 10;
}
.calendar-button:hover {
    background: #edf2f7;
    transform: translateY(-50%) scale(1.1);
}
.calendar-button svg {
    width: 20px;
    height: 20px;
}
.input-with-swap {
    position: relative;
}
.input-with-swap .input-field {
    padding-right: 45px;
}
.swap-button-inline {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 2px solid #cbd5e0;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4299e1;
    z-index: 10;
}
.swap-button-inline:hover {
    border-color: #4299e1;
    background: #edf2f7;
    transform: translateY(-50%) rotate(180deg);
}
.swap-button-inline svg {
    width: 16px;
    height: 16px;
}
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2c5282, #4299e1);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(44,82,130,0.4);
    touch-action: manipulation;
    -webkit-appearance: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-primary:hover, .btn-primary:active {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44,82,130,0.5);
    background: linear-gradient(135deg, #2a4365, #3182ce);
}
.btn-primary:active {
    transform: translateY(-1px);
}
.benefits {
    padding: 30px 20px;
}
.benefits h3 {
    color: #2c5282;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}
.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.98);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(30,58,138,0.12);
    border: 2px solid rgba(219,234,254,0.5);
    transition: all 0.3s ease;
    animation: slideInLeft 0.8s ease-out both;
}
.benefit-item:nth-child(2) { animation-delay: 0.1s; }
.benefit-item:nth-child(3) { animation-delay: 0.2s; }
.benefit-item:nth-child(4) { animation-delay: 0.3s; }
.benefit-item:nth-child(5) { animation-delay: 0.4s; }
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(30,58,138,0.18);
}
.benefit-icon {
    width: 32px;
    height: 32px;
    margin-right: 18px;
    color: #3b82f6;
    flex-shrink: 0;
}
.benefit-text {
    color: #1e40af;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}
.reviews-section {
    padding: 25px 20px;
}
.reviews-header {
    color: #2c5282;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.4;
}
.review {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,1) 100%);
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 25px rgba(30,58,138,0.15);
    border: 2px solid rgba(219,234,254,0.3);
    position: relative;
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-out both;
}
.review:nth-child(2) { animation-delay: 0.1s; }
.review:nth-child(3) { animation-delay: 0.2s; }
.review:nth-child(4) { animation-delay: 0.3s; }
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.review:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(30,58,138,0.18);
}
.review::before {
    content: '"';
    position: absolute;
    top: -5px;
    left: 20px;
    font-size: 60px;
    color: rgba(59,130,246,0.2);
    font-family: serif;
    line-height: 1;
}
.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.review-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(30,58,138,0.2);
}
.review-info h4 {
    font-size: 15px;
    margin-bottom: 3px;
    font-weight: 600;
    color: #1e40af;
}
.review-location {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
.review-stars {
    color: #f59e0b;
    font-size: 14px;
    margin-left: auto;
    font-weight: 600;
}
.review-text {
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
    font-weight: 400;
    font-style: italic;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}
.faq {
    padding: 10px 20px 20px;
    padding-bottom: 100px;
}
.faq h3 {
    color: #2c5282;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}
.faq-item {
    background: rgba(255,255,255,0.98);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 2px solid rgba(203,213,224,0.3);
}
.faq-question {
    padding: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2c5282;
}
.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: #718096;
}
.faq-answer.open {
    max-height: 200px;
    padding: 0 15px 15px;
}
.autocomplete-container {
    position: relative;
}
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}
.autocomplete-dropdown.show {
    display: block;
}
.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
    font-size: 15px;
    color: #1e40af;
}
.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background-color: #f8fafc;
}
.station-name {
    font-weight: 500;
}
.station-region {
    font-size: 13px;
    color: #64748b;
    margin-left: 8px;
}
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 10px 15px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom, 20px));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-top: 2px solid #e2e8f0;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
    pointer-events: none;
    min-height: 60px;
    display: flex;
    align-items: center;
}
.sticky-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.sticky-cta .btn-primary {
    margin: 0;
    width: 100%;
    max-width: none;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.brand-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 20px;
}
.brand-modal-overlay.show {
    display: flex;
}
.brand-modal {
    background: white;
    border-radius: 24px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.brand-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: none;
}
.brand-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
}
.brand-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.brand-modal-close:hover {
    background: #f1f5f9;
    color: #1e40af;
}
.brand-modal-content {
    padding: 0 24px 24px;
}
.brand-modal-main-text {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 8px 0;
    line-height: 1.4;
}
.brand-modal-sub-text {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px 0;
}
.brand-modal-form {
    margin-bottom: 24px;
}
.brand-modal-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    text-align: center;
    color: #1e40af;
    font-weight: 500;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}
.brand-modal-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.brand-modal-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.brand-modal-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2c5282, #4299e1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 82, 130, 0.3);
}
.brand-modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.4);
}
.brand-modal-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
}
.brand-modal-card {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 3px solid #4299e1;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    position: relative;
    overflow: hidden;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.15);
    transition: all 0.3s ease;
}
.brand-modal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(66, 153, 225, 0.25);
}
.brand-modal-card-letter {
    font-size: 42px;
    font-weight: 800;
    color: #4299e1;
    line-height: 1;
    display: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
@keyframes logoAppear {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}
.brand-modal-logo.loaded {
    animation: logoAppear 0.5s ease-out;
}
.brand-modal.rzd .brand-modal-card {
    border-color: #d52b1e;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}
.brand-modal.sapsan .brand-modal-card {
    border-color: #2b6cb0;
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
}
.brand-modal.lastochka .brand-modal-card {
    border-color: #38a169;
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
}
/* Calendar Styles */
.calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    padding: 20px;
}
.calendar-overlay.show {
    display: flex;
}
.calendar-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.calendar-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
}
.calendar-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.calendar-close:hover {
    background: #f1f5f9;
    color: #1e40af;
}
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.calendar-nav button {
    background: none;
    border: none;
    font-size: 18px;
    color: #4299e1;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.calendar-nav button:hover {
    background: #edf2f7;
}
.calendar-month-year {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}
.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    padding: 8px 0;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.calendar-day {
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: #1e40af;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
}
.calendar-day:hover {
    background: #edf2f7;
}
.calendar-day.selected {
    background: #4299e1;
    color: white;
}
.calendar-day.other-month {
    color: #cbd5e0;
}
.calendar-day.today {
    background: #e6fffa;
    color: #234e52;
    font-weight: 700;
}
.calendar-day.disabled {
    color: #e2e8f0;
    cursor: not-allowed;
}
.calendar-day.disabled:hover {
    background: none;
}
@media (max-width: 480px) {
    .secondary-header {
        padding: 12px 16px;
    }
    .train-brands-header {
        gap: 8px;
    }
    .train-brand-header {
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 18px;
        min-height: 48px;
    }
    .brand-modal-card {
        width: 120px;
        height: 120px;
    }
    .brand-modal-logo {
        width: 60px;
        height: 60px;
    }
    .calendar-container {
        padding: 20px;
    }
    .calendar-day {
        padding: 10px 0;
        font-size: 13px;
    }
}
@media (max-width: 320px) {
    .hero h1 { font-size: 18px; }
    .hero p { font-size: 13px; }
    .container { padding: 0 15px; }
}

@media (min-width: 1028px) {
    body {
        max-width: 1028px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
}
.error-message {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}
.input-field.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229,62,62,0.1);
}
.footer-legal {
    background: #ffffff;
    color: #64748b;
    padding: 20px;
    font-size: 10px;
    line-height: 1.4;
    margin-top: 50px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.redirect-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loader-text {
    color: #1e40af;
    font-size: 16px;
    font-weight: 600;
}
.review-photo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.phone-page {
    padding: 20px 20px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
}

.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 20px;
    margin: 0 auto 20px auto;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-radius: 25px;
    max-width: 90%;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transform: translateY(-30px);
    opacity: 0;
    transition: all 0.6s ease-out;
    animation: slideInSuccess 0.8s ease-out forwards;
}

@keyframes slideInSuccess {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.phone-form {
    background: rgba(255,255,255,0.98);
    border-radius: 20px;
    padding: 25px 20px 20px;
    margin-bottom: 20px;
    flex: 0 0 auto;
    border: 2px solid #cbd5e0;
    box-shadow: 0 4px 25px rgba(44,82,130,0.12);
}

.phone-form h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c5282;
}

.phone-form p {
    color: #718096;
    margin-bottom: 18px;
    font-size: 14px;
}

/* ДОБАВЛЕННЫЙ СТИЛЬ ДЛЯ ЯРКОГО СИНЕГО ЦВЕТА ДАТЫ */
.date-highlight {
    color: #0066ff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,102,255,0.2);
}

.phone-form form {
    margin-bottom: 0;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2c5282, #4299e1);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(44,82,130,0.4);
    touch-action: manipulation;
    -webkit-appearance: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
    margin-bottom: 0;
}

.btn-secondary {
    background: none;
    color: #64748b;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 8px 0;
    display: block;
    width: 100%;
    text-align: center;
}

.btn-secondary:hover {
    color: #475569;
}

.trust-elements {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
    padding: 0 5px;
    flex: 1 1 auto;
    align-content: start;
}

.trust-item {
    text-align: center;
    padding: 10px 4px;
    background: rgba(66, 153, 225, 0.08);
    border-radius: 12px;
    border: 2px solid rgba(66, 153, 225, 0.2);
    transition: all 0.3s ease;
    min-height: 100px;
    max-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.trust-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.2);
}

.trust-icon {
    width: 24px;
    height: 24px;
    margin: 0 auto 0px;
    color: #4299e1;
    flex-shrink: 0;
}

.trust-title {
    font-size: 10px;
    font-weight: 600;
    color: #2c5282;
    margin-bottom: 4px;
    line-height: 1.1;
    height: auto;
    max-height: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    hyphens: auto;
}

.trust-subtitle {
    font-size: 8px;
    color: #718096;
    line-height: 1.1;
    height: auto;
    max-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    hyphens: auto;
    margin-top: auto;
}

.page-back-button {
    margin-top: auto;
    padding-top: 15px;
}

.page-back-button .btn-secondary {
    max-width: 280px;
    margin: 0 auto;
}

.chart-section {
    background: rgba(255,255,255,0.98);
    border-radius: 20px;
    padding: 25px 20px;
    margin: 20px 15px;
    box-shadow: 0 4px 25px rgba(44,82,130,0.12);
    border: 2px solid rgba(203,213,224,0.3);
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 8px;
    text-align: center;
}

.chart-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 20px;
    text-align: center;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-label {
    min-width: 80px;
    font-size: 12px;
    font-weight: 500;
    color: #1e40af;
    text-align: left;
}

.bar-container {
    flex: 1;
    height: 24px;
    background: #f8fafc;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 1s ease-out;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.bar-value {
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.bar-fill.excellent { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.bar-fill.very-good { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.bar-fill.good { background: linear-gradient(135deg, #3b82f6, #93c5fd); }
.bar-fill.good-alt { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.bar-fill.average { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.bar-fill.poor { background: linear-gradient(135deg, #64748b, #94a3b8); }

/* Mobile optimizations */
@media (max-width: 480px) {
    .secondary-header {
        padding: 12px 16px;
    }

    .train-brands-header {
        gap: 8px;
    }

    .train-brand-header {
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 18px;
        min-height: 48px;
    }
}

/* Стили для согласия как на payment */
.consent-section {
    margin: 20px 0 10px 0;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}

.consent-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transition: all 0.2s;
    margin-top: 2px;
}

.consent-checkbox.checked {
    background: #2c5282;
    border-color: #2c5282;
}

.consent-checkbox svg {
    width: 12px;
    height: 12px;
    stroke: white;
    stroke-width: 3;
    display: none;
}

.consent-checkbox.checked svg {
    display: block;
}

.consent-text a {
    color: #2c5282;
    text-decoration: none;
}

.consent-text a:hover {
    text-decoration: underline;
}

/* Ссылка "изменить номер" */
.change-phone-link {
    color: #4299e1;
    text-decoration: none;
    font-size: 13px;
    margin-top: 8px;
    display: inline-block;
}

.change-phone-link:hover {
    text-decoration: underline;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.change-phone-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.change-phone-link:hover {
    color: #4299e1;
    text-decoration: underline;
}

.resend-code {
    text-align: center;
    margin-top: 20px;
}

.resend-code a {
    color: #4299e1;
    text-decoration: none;
    font-weight: 500;
}

.resend-code a:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.review:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(30,58,138,0.18);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .hero {
        padding: 15px 15px;
        margin: 10px;
    }
    .hero h1 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    .hero p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    .train-input-group {
        margin-bottom: 12px;
    }
    .input-field {
        padding: 12px 14px;
    }
    .btn-primary, .btn-secondary {
        padding: 14px;
        font-size: 16px;
    }
}

@media (max-height: 700px) {
    .hero {
        padding: 15px 15px;
        margin: 10px;
    }
    .hero h1 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    .hero p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    .train-input-group {
        margin-bottom: 12px;
    }
    .input-field {
        padding: 12px 14px;
    }
    .btn-primary, .btn-secondary {
        padding: 14px;
        font-size: 16px;
    }
}

.payment-page {
    padding: 20px 20px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
}

.payment-form {
    background: rgba(255,255,255,0.98);
    border-radius: 20px;
    padding: 25px 20px 20px;
    margin-bottom: 20px;
    flex: 0 0 auto;
    border: 2px solid #cbd5e0;
    box-shadow: 0 4px 25px rgba(44,82,130,0.12);
}

.payment-form h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c5282;
}

.payment-form p {
    color: #718096;
    margin-bottom: 18px;
    font-size: 14px;
}

.premium-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    justify-content: center;
}

.premium-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2c5282, #4299e1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.premium-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.premium-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c5282;
    background: linear-gradient(135deg, #2c5282, #4299e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-subtitle {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.4;
}

.premium-features {
    margin-bottom: 28px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(66, 153, 225, 0.08);
    border-radius: 12px;
    border-left: 4px solid #4299e1;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.feature-check svg {
    width: 12px;
    height: 12px;
    color: white;
    stroke-width: 3;
}

.feature-text {
    font-size: 15px;
    font-weight: 500;
    color: #1e40af;
    line-height: 1.4;
}

.premium-price {
    text-align: center;
    margin-bottom: 24px;
}

.price-text {
    font-size: 28px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 8px;
}

.price-subtext {
    font-size: 14px;
    color: #64748b;
}

.btn-primary svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.consent-section {
    margin-bottom: 16px;
    margin-top: 32px
}

.legal-notice {
    font-size: 10px;
    color: #64748b;
    line-height: 1.3;
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 12px;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .secondary-header {
        padding: 12px 16px;
    }

    .train-brands-header {
        gap: 8px;
    }

    .train-brand-header {
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 18px;
        min-height: 48px;
    }

    .premium-title {
        font-size: 20px;
    }

    .premium-subtitle {
        font-size: 14px;
    }

    .price-text {
        font-size: 24px;
    }

    .btn-primary {
        font-size: 16px;
        padding: 16px;
        margin-bottom: 24px;
    }
}