* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.header img {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border-radius: 8px;
}

.header span {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Security Message */
.security-message {
    padding: 24px 20px;
    background: #f8f9fa;
}

.security-message h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.security-message p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Card Form */
.card-form {
    padding: 24px 20px;
}

.card-brands {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 20px;
}

.card-brands img {
    height: 24px;
    width: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1877f2;
}

.form-group input.error {
    border-color: #dc3545;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cvv-input {
    position: relative;
}

.cvv-input input {
    padding-right: 48px;
}

.cvv-input img {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 24px;
}

/* Error Message */
.error-message {
    display: none;
    padding: 12px;
    margin-bottom: 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 14px;
}

.error-message.show {
    display: block;
}

/* Submit Button */
button[type="submit"] {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: #1877f2;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

button[type="submit"]:hover {
    background: #166fe5;
}

button[type="submit"]:active {
    background: #1564d6;
}

button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Footer */
.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #f8f9fa;
    color: #666;
    font-size: 13px;
    gap: 6px;
}

.footer svg {
    color: #28a745;
}

/* App-specific colors */
body.facebook button[type="submit"] {
    background: #1877f2;
}

body.youtube button[type="submit"] {
    background: #ff0000;
}

body.whatsapp button[type="submit"] {
    background: #25d366;
}

body.instagram button[type="submit"] {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Loading state */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
