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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.form-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="date"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #e1e5e9;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

input[type="file"]:hover {
    border-color: #667eea;
}

.photo-preview {
    margin-top: 15px;
    text-align: center;
}

.photo-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wallet-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: center;
}

.wallet-section h3 {
    margin-bottom: 15px;
    color: #555;
}

.wallet-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wallet-btn:hover {
    background: #5a6fd8;
}

.wallet-info {
    margin-top: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
}

.wallet-info span {
    display: block;
    margin: 5px 0;
}

.wallet-instructions {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.wallet-help {
    margin-top: 15px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 5px;
    font-size: 14px;
}

.wallet-help a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 600;
}

.wallet-help a:hover {
    text-decoration: underline;
}

.wallet-status {
    margin-top: 10px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    color: #856404;
}

.wallet-status .status-text {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.create-btn {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.create-btn:hover:not(:disabled) {
    background: #218838;
}

.create-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

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

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

.loading p {
    font-size: 18px;
    color: #555;
    margin-bottom: 10px;
}

.loading-text {
    font-size: 14px;
    color: #888;
}

.success {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.success h3 {
    color: #28a745;
    margin-bottom: 20px;
    font-size: 24px;
}

.memorial-link {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.memorial-link label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.memorial-link input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    font-family: monospace;
}

.copy-btn, .view-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    transition: background-color 0.3s ease;
}

.copy-btn:hover, .view-btn:hover {
    background: #0056b3;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.8;
}

footer a {
    color: white;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 20px;
    }
}

/* Payment Options Styles */
.payment-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.payment-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.payment-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-option {
    flex: 1;
}

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

.payment-label {
    display: block;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-label:hover {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.1);
}

.payment-option input[type="radio"]:checked + .payment-label {
    border-color: #007bff;
    background: #f8f9ff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

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

.payment-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.payment-title {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.payment-cost {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

.payment-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.wallet-section {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.wallet-section h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.paypal-section {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.paypal-section h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.paypal-instructions {
    color: #6c757d;
    margin-bottom: 15px;
}

.paypal-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.paypal-info p {
    margin: 5px 0;
    color: #495057;
}

.paypal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #0070ba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.paypal-btn:hover {
    background: #005ea6;
}

.paypal-logo {
    height: 20px;
    width: auto;
}

@media (max-width: 768px) {
    .payment-options {
        flex-direction: column;
    }

    .payment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .payment-cost {
        align-self: flex-end;
    }
}

/* Preview Section Styles */
.preview-section {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.preview-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.3rem;
    text-align: center;
}

.preview-container {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
}

.memorial-preview-frame {
    width: 100%;
    height: 500px;
    border: none;
    background: white;
}

@media (max-width: 768px) {
    .memorial-preview-frame {
        height: 400px;
    }
}

/* History Section Styles */
.history-section {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.history-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.history-note {
    font-size: 0.75rem;
    font-weight: normal;
    color: #6c757d;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-timestamp {
    font-size: 0.85rem;
    color: #6c757d;
}

.history-item-notes {
    font-size: 0.95rem;
    color: #495057;
    font-style: italic;
}

.history-item-url {
    display: flex;
    gap: 10px;
    align-items: center;
}

.history-item-url input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.85rem;
}

.history-item-actions {
    display: flex;
    gap: 5px;
}

.history-item-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.history-copy-btn {
    background: #007bff;
    color: white;
}

.history-copy-btn:hover {
    background: #0056b3;
}

.history-open-btn {
    background: #28a745;
    color: white;
}

.history-open-btn:hover {
    background: #218838;
}

.history-delete-btn {
    background: #dc3545;
    color: white;
}

.history-delete-btn:hover {
    background: #c82333;
}

.history-empty {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
}

.clear-history-btn {
    margin-top: 15px;
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.clear-history-btn:hover {
    background: #5a6268;
}

.memorial-notes {
    margin: 15px 0;
}

.memorial-notes label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.memorial-notes input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.save-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.save-btn:hover {
    background: #218838;
}
