:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --accent-color: #8b5cf6;
    --dark-bg: #0f172a;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: white !important;
}

.btn-primary {
    background: var(--gradient-1);
    border: none;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* Hero Section */
.hero-section {
    background: var(--dark-bg);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 100px;
}

.hero-stats {
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Server Visual */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.server-visual {
    position: relative;
}

.server-rack {
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    border-radius: 8px;
    padding: 20px;
    width: 200px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.server-unit {
    background: linear-gradient(90deg, #475569 0%, #64748b 100%);
    height: 40px;
    margin-bottom: 10px;
    border-radius: 4px;
    position: relative;
}

.server-unit.active {
    background: linear-gradient(90deg, #334155 0%, #475569 100%);
}

.server-unit.active::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.hero-wave svg {
    width: 100%;
    height: auto;
}

/* Features Section */
.features-section {
    background: #f8f9fa;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-card h5 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Tariffs Section */
.tariffs-section {
    background: #f8f9fa;
}

.tariff-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.tariff-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.tariff-card.popular {
    border: 2px solid var(--primary-color);
}

.tariff-card.premium {
    background: var(--gradient-1);
    color: white;
}

.tariff-card.premium .tariff-name,
.tariff-card.premium .tariff-price,
.tariff-card.premium .tariff-specs {
    color: white;
}

.tariff-card.premium .tariff-specs li {
    border-color: rgba(255, 255, 255, 0.2);
}

.popular-badge {
    position: absolute;
    top: 20px;
    right: -40px;
    background: var(--gradient-1);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 8px 40px;
    transform: rotate(45deg);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tariff-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tariff-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.tariff-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.currency {
    color: var(--text-muted);
    font-weight: 500;
}

.tariff-card.premium .price {
    color: white;
}

.tariff-card.premium .currency {
    color: rgba(255, 255, 255, 0.8);
}

.tariff-body {
    padding: 1.5rem 2rem;
}

.tariff-specs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tariff-specs li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tariff-specs li:last-child {
    border-bottom: none;
}

.tariff-specs i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.tariff-card.premium .tariff-specs i {
    color: white;
}

.tariff-footer {
    padding: 0 2rem 2rem;
}

/* Единый стиль для всех кнопок заказа */
.order-btn {
    background: var(--gradient-1) !important;
    color: white !important;
    border: none !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.order-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    background: var(--gradient-2) !important;
}

/* Кнопка для премиум тарифов (Ultimate) - белый фон */
.tariff-card.premium .order-btn {
    background: white !important;
    color: var(--primary-color) !important;
}

.tariff-card.premium .order-btn:hover {
    background: #f8f9fa !important;
    color: var(--primary-dark) !important;
}

.os-select {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.os-select .form-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.os-select .form-select {
    border-radius: 8px;
    font-size: 0.875rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236366f1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.os-select .form-select:hover {
    border-color: var(--primary-color);
    background-color: white;
}

.os-select .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background-color: white;
    outline: none;
}

/* Опции в выпадающем списке */
.os-select .form-select option {
    padding: 0.5rem;
    background-color: white;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.os-select .form-select option:checked {
    background-color: var(--primary-color);
    color: white;
}

/* Для премиум тарифов (Ultimate) */
.tariff-card.premium .os-select {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.tariff-card.premium .os-select .form-label {
    color: rgba(255, 255, 255, 0.8);
}

.tariff-card.premium .os-select .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.tariff-card.premium .os-select .form-select:hover,
.tariff-card.premium .os-select .form-select:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.tariff-card.premium .os-select .form-select option {
    background-color: #1e293b;
    color: white;
}

.tariff-card.premium .os-select .form-select option:checked {
    background-color: var(--primary-color);
    color: white;
}

/* Payment Section */
.payment-section {
    background: #f8f9fa;
}

.payment-card {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.payment-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.payment-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    color: white;
}

.payment-card h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Rules Section */
.rules-section {
    background: white;
}

.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.accordion-button {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    background: white;
    border: none;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
}

.accordion-button:not(.collapsed) i {
    color: white !important;
}

.accordion-button:focus {
    box-shadow: none;
}

.accordion-body {
    padding: 1.5rem;
    background: #f8f9fa;
}

.accordion-body ul {
    padding-left: 1.5rem;
}

.accordion-body li {
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-section {
    background: var(--dark-bg) !important;
}

.btn-telegram {
    background: #0088cc;
    color: white;
    border: none;
}

.btn-telegram:hover {
    background: #0099e6;
    color: white;
    transform: translateY(-2px);
}

.contact-buttons .btn {
    transition: all 0.3s ease;
}

.contact-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Modal */
.modal-content {
    border-radius: 16px;
    border: none;
}

.modal-header {
    background: var(--gradient-1);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.server-rack {
    animation: float 4s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-content {
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .price {
        font-size: 2rem;
    }
    
    .tariff-header {
        padding: 1.5rem;
    }
    
    .tariff-body {
        padding: 1rem 1.5rem;
    }
    
    .tariff-footer {
        padding: 0 1.5rem 1.5rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
