* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 1200px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.plan-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.plan-card.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.plan-card h3 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.plan-card .price {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin: 15px 0;
}

.plan-card .features {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 15px 0;
    color: #666;
}

.select-plan {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.select-plan:hover {
    background: #5a67d8;
}

#order-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.selected-plan {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s;
}

button[type="submit"]:hover {
    background: #218838;
}

button[type="button"] {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

button[type="button"]:hover {
    background: #c82333;
}

#order-status {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    text-align: center;
}

.loading {
    font-size: 1.2em;
    color: #666;
}

.success {
    color: #28a745;
    font-size: 1.5em;
    margin: 20px 0;
}

.error {
    color: #dc3545;
    font-size: 1.5em;
    margin: 20px 0;
}

#order-details {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.connection-link {
    display: inline-block;
    padding: 15px 30px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin: 15px 0;
    word-break: break-all;
}

.copy-link {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.copy-link:hover {
    background: #138496;
}

button[type="submit"]:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.8;
}

button[type="submit"].loading {
    position: relative;
    color: transparent;
}

button[type="submit"].loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.connection-link-input {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    font-family: monospace;
    font-size: 0.85em;
    border: 2px solid #667eea;
    border-radius: 8px;
    resize: vertical;
    margin: 15px 0;
    background: #f8f9fa;
    word-break: break-all;
    min-height: 80px;
    color: #333;
}

.connection-link-input:focus {
    outline: none;
    border-color: #5a67d8;
    background: #fff;
}

.copy-link {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 10px;
    transition: background 0.3s;
}

.copy-link:hover {
    background: #138496;
}


.check-payment-btn {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin-top: 15px;
    display: inline-block;
}

.check-payment-btn:hover:not(:disabled) {
    background: #5a67d8;
}

.check-payment-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.check-payment-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.8;
}

/* На случай, если кнопка с рамкой от браузера */
#check-payment-btn {
    border: none;
    outline: none;
}