/* Alipay Global Payment - Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1677ff;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #1677ff;
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.feature-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.feature-card h3 {
    color: #1677ff;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: #1677ff;
    color: #fff;
}

.btn-primary:hover {
    background: #0958d9;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
}

.btn-danger:hover {
    background: #cf1322;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* API Section */
.api-section {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.api-section h2 {
    margin-bottom: 30px;
    color: #1a1a1a;
}

.endpoint-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.method {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.method-post {
    background: #e6f7ff;
    color: #1677ff;
}

.method-get {
    background: #f6ffed;
    color: #52c41a;
}

.method-put {
    background: #fff7e6;
    color: #fa8c16;
}

.method-delete {
    background: #fff1f0;
    color: #f5222d;
}

.path {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #333;
}

.endpoint p {
    color: #666;
    margin-left: auto;
    font-size: 0.9rem;
}

/* Setup Section */
.setup-section {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
}

.setup-section h2 {
    margin-bottom: 30px;
}

.setup-steps {
    padding-left: 20px;
}

.setup-steps li {
    margin-bottom: 15px;
    padding-left: 10px;
}

.setup-steps code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
}

/* Checkout Page */
.checkout-container {
    max-width: 600px;
    margin: 0 auto;
}

.checkout-container h1 {
    text-align: center;
    margin-bottom: 10px;
}

.checkout-container .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

.payment-form {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

/* Payment Result */
.payment-result {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-top: 30px;
}

.payment-result h2 {
    margin-bottom: 20px;
}

.result-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: #666;
}

.result-value {
    font-weight: 500;
    color: #333;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

#payment-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1677ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Result Page */
.result-container {
    max-width: 600px;
    margin: 0 auto;
}

.result-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.result-header {
    padding: 30px;
    text-align: center;
    background: #f9f9f9;
}

.result-header.success {
    background: #f6ffed;
}

.result-header .icon {
    font-size: 3rem;
    color: #52c41a;
    display: block;
    margin-bottom: 10px;
}

.result-body {
    padding: 30px;
}

.result-body p {
    margin-bottom: 10px;
}

.result-body .info {
    color: #666;
    font-size: 0.9rem;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Footer */
.footer {
    background: #fff;
    padding: 20px 0;
    text-align: center;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: auto;
}

/* Utility */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}
