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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.title {
    text-align: center;
    padding: 20px;
    font-size: 24px;
    font-weight: 600;
    background: #0f0f0f;
    border-bottom: 1px solid #333;
}

#content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #0f0f0f;
}

.server-card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #333;
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.server-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status-badge.available {
    background: #00d632;
    color: #000;
}

.status-badge.active {
    background: #ffd700;
    color: #000;
}

.server-specs {
    margin-bottom: 24px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: #999;
    font-size: 14px;
}

.spec-item i {
    display: none;
}

.rent-button {
    width: 100%;
    padding: 16px;
    background: #ffd700;
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.rent-button:hover {
    background: #ffed4e;
    transform: translateY(-2px);
}

.rent-button i {
    display: none;
}

.bottom-nav {
    display: flex;
    background: #1a1a1a;
    border-top: 1px solid #333;
    padding: 8px;
    gap: 8px;
}

.nav-btn {
    flex: 1;
    padding: 12px;
    background: #2a2a2a;
    border: none;
    border-radius: 12px;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn.active {
    background: #333;
    color: #fff;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.empty-state p {
    color: #666;
    font-size: 16px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.control-btn {
    padding: 14px;
    background: #2a2a2a;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: #333;
}

.control-btn.extend {
    background: #ffd700;
    color: #000;
}

.option-item {
    width: 100%;
    padding: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.option-item:hover {
    background: #2a2a2a;
}

.option-item i {
    display: none;
}

.arrow {
    color: #666;
}

.time-left {
    background: #2a2a2a;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.time-left span {
    display: block;
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.time-left strong {
    font-size: 20px;
    color: #ffd700;
}

.server-specs {
    margin-bottom: 20px;
}

.spec-item {
    line-height: 1.4;
}

.payment-container {
    max-width: 500px;
    margin: 0 auto;
}

.payment-summary {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #333;
}

.payment-summary h3 {
    color: #ffd700;
    margin-bottom: 12px;
}

.payment-summary p {
    margin-bottom: 8px;
    color: #ccc;
}

.payment-methods {
    margin-bottom: 20px;
}

.payment-methods h3 {
    margin-bottom: 16px;
}

.payment-method-btn {
    width: 100%;
    padding: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.payment-method-btn:hover {
    background: #2a2a2a;
    border-color: #ffd700;
}

/* SSH информация */
.ssh-info {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.ssh-info h4 {
    margin-bottom: 12px;
    color: #ffd700;
}

.ssh-field {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.ssh-field label {
    width: 80px;
    color: #999;
    font-size: 14px;
}

.ssh-value {
    flex: 1;
    background: #1a1a1a;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
}

.ssh-value.password {
    filter: blur(3px);
    transition: filter 0.2s;
}

.ssh-value.password:hover {
    filter: none;
}

.copy-btn {
    padding: 6px 12px;
    background: #333;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.copy-btn:hover {
    background: #444;
}

/* Состояние занятости */
.busy-info {
    text-align: center;
    padding: 20px;
    background: #2a2a2a;
    border-radius: 12px;
}

.busy-info p {
    color: #999;
    margin-bottom: 8px;
}

.busy-info strong {
    font-size: 18px;
    color: #ffd700;
}

/* Кнопка назад */
.back-button {
    margin-top: 20px;
    padding: 12px 24px;
    background: #2a2a2a;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
}

.back-button:hover {
    background: #333;
}

/* Правила */
.rules-container {
    padding-bottom: 20px;
}

.rules-container h2 {
    margin-bottom: 20px;
}

.rule-section {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #333;
}

.rule-section h3 {
    color: #ffd700;
    margin-bottom: 12px;
}

.rule-section p {
    margin-bottom: 8px;
    color: #ccc;
    line-height: 1.5;
}

/* Кнопка повтора */
.retry-btn {
    margin-top: 16px;
    padding: 12px 24px;
    background: #ffd700;
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.retry-btn:hover {
    background: #ffed4e;
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Ошибка */
.error-state {
    text-align: center;
    padding: 40px;
}

.error-state h3 {
    margin-bottom: 12px;
}

.error-state p {
    color: #999;
}

/* Радио-кнопки тарифов */
.tariff-radio {
    display: block;
    margin-bottom: 12px;
    cursor: pointer;
}

.tariff-radio input[type="radio"] {
    display: none;
}

.tariff-radio .tariff-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    transition: all 0.2s;
}

.tariff-radio input[type="radio"]:checked + .tariff-content {
    background: #2a2a2a;
    border-color: #ffd700;
}

.tariff-radio:hover .tariff-content {
    background: #2a2a2a;
}

/* Страница оплаты */
.payment-page {
    max-width: 500px;
    margin: 0 auto;
}

.payment-page h2 {
    margin-bottom: 24px;
    text-align: center;
}

.section {
    margin-bottom: 24px;
}

.section h3 {
    margin-bottom: 16px;
    color: #ffd700;
    font-size: 16px;
}

/* Опции тарифов */
.tariff-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tariff-option {
    display: block;
    cursor: pointer;
}

.tariff-option input[type="radio"] {
    display: none;
}

.tariff-option .tariff-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    transition: all 0.2s;
}

.tariff-option input[type="radio"]:checked + .tariff-content {
    border-color: #ffd700;
    background: #2a2a2a;
}

.tariff-option .tariff-content strong {
    color: #ffd700;
    font-size: 18px;
}

/* Опции оплаты */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    display: block;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option .payment-content {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    transition: all 0.2s;
}

.payment-option input[type="radio"]:checked + .payment-content {
    border-color: #ffd700;
    background: #2a2a2a;
}

.payment-option .payment-content small {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

/* Итого */
.total-section {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    border: 1px solid #333;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-row strong {
    font-size: 24px;
    color: #ffd700;
}

/* Кнопка оплаты */
.pay-button {
    width: 100%;
    padding: 16px;
    background: #ffd700;
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pay-button:hover {
    background: #ffed4e;
    transform: translateY(-2px);
}

/* Отказ в доступе */
.access-denied {
    text-align: center;
    padding: 40px 20px;
}

.access-denied h2 {
    color: #ff4444;
    margin-bottom: 20px;
}

.access-denied p {
    color: #999;
    margin-bottom: 30px;
}

/* Loading screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: #ffffff;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Мониторинг */
.monitoring-section {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.monitoring-section h4 {
    margin-bottom: 12px;
    color: #ffd700;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.monitor-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #1a1a1a;
    border-radius: 8px;
}

.monitor-label {
    color: #999;
    font-size: 14px;
}

.monitor-value {
    font-weight: 600;
    color: #fff;
}

.monitor-value.status-online {
    color: #00d632;
}

/* Информация о системе */
.server-info {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.server-info h4 {
    margin-bottom: 12px;
    color: #ffd700;
}

.info-grid {
    display: grid;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #1a1a1a;
    border-radius: 8px;
}

.info-item span {
    color: #999;
    font-size: 14px;
}

.info-item strong {
    color: #fff;
}

/* SSH команда */
.ssh-command {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #333;
}

.ssh-command label {
    display: block;
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.ssh-command .ssh-value {
    font-size: 13px;
}

/* Время до конца */
.time-left {
    background: #1a1a1a;
    border: 2px solid #ffd700;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.time-left span {
    display: block;
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.time-left strong {
    font-size: 24px;
    color: #ffd700;
}

/* Мониторинг */
.monitoring-section {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.monitoring-section h4 {
    margin-bottom: 12px;
    color: #ffd700;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.monitor-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #1a1a1a;
    border-radius: 8px;
}

.monitor-label {
    color: #999;
    font-size: 14px;
}

.monitor-value {
    font-weight: 600;
    color: #fff;
}

.monitor-value.status-online {
    color: #00d632;
}

/* Информация о системе */
.server-info {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.server-info h4 {
    margin-bottom: 12px;
    color: #ffd700;
}

.info-grid {
    display: grid;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #1a1a1a;
    border-radius: 8px;
}

.info-item span {
    color: #999;
    font-size: 14px;
}

.info-item strong {
    color: #fff;
}

/* SSH команда */
.ssh-command {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #333;
}

.ssh-command label {
    display: block;
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.ssh-command .ssh-value {
    font-size: 13px;
}

/* Время до конца */
.time-left {
    background: #1a1a1a;
    border: 2px solid #ffd700;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.time-left span {
    display: block;
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.time-left strong {
    font-size: 24px;
    color: #ffd700;
}

/* Исправления для статуса */
.status-badge.busy {
    background: #ff4444;
    color: #fff;
}

/* Дата освобождения */
.availability-date {
    margin-top: 12px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 8px;
    font-size: 14px;
    color: #ffd700;
    text-align: center;
}

/* Исправление кнопки продлить */
.control-btn.extend {
    background: #ffd700;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 12px 8px;
}

.control-btn span {
    font-size: 13px;
}

/* Адаптив для маленьких экранов */
@media (max-width: 400px) {
    .control-grid {
        grid-template-columns: 1fr;
    }
    
    .control-btn {
        width: 100%;
    }
}

.info-block-os {
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    color: #94a3b8;
    font-size: 13px;
}

.info-block-payment {
    background: #1a1a2e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 12px;
    margin: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
