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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
}

.card h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #555;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #667eea;
}

.form-group .input-row {
    display: flex;
    gap: 10px;
}

.form-group .input-row input {
    flex: 1;
}

.form-group .input-row button {
    white-space: nowrap;
    padding: 12px 16px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.form-group .input-row button:hover {
    background: #5a6fd6;
}

.form-group .input-row button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-row input {
    flex: 1;
}

.captcha-row img {
    height: 42px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
}

.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn:hover {
    opacity: 0.9;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    width: auto;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.links {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
}

.links a {
    color: #667eea;
    text-decoration: none;
    margin: 0 8px;
}

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

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #ffe0e0;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.user-center {
    max-width: 800px;
}

.user-center .card {
    padding: 30px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #fff;
    margin-bottom: 24px;
}

.user-info .info-left h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.user-info .info-left p {
    font-size: 14px;
    opacity: 0.9;
}

.user-info .info-right {
    text-align: right;
}

.user-info .info-right .expire-tag {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.expire-tag.active {
    background: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.expire-tag.expired {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.section {
    margin-bottom: 24px;
}

.section h4 {
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card-item {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s, transform 0.2s;
    cursor: pointer;
}

.card-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.card-item .card-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.card-item .card-duration {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.card-item .card-price {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.card-item .card-price small {
    font-size: 14px;
    font-weight: 400;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 440px;
}

.modal h3 {
    margin-bottom: 20px;
    color: #333;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #888;
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    .user-info .info-right {
        text-align: center;
        margin-top: 12px;
    }
}
