:root {
    --primary-color: #FFD700;
    --secondary-color: #B8860B;
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --card-background: #2a2a2a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    text-align: center;
    padding: 1rem 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--background-color);
}

header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--background-color);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.step {
    background-color: var(--card-background);
    padding: 0.15rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.step h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--background-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.2s;
}

.button:hover {
    transform: translateY(-2px);
}

.price-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.price-card {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.discount-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.discount-card {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.discount-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.discount-info {
    margin-top: 1rem;
}

.discount-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.discount-info li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.discount-info li:last-child {
    border-bottom: none;
}

.discount-tier {
    color: var(--text-color);
    font-weight: 500;
}

.discount-value {
    color: var(--primary-color);
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-background);
    margin-top: 4rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.purchase-form-container {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    min-height: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.form-group input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.purchase-form button[type="submit"] {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    header {
        padding: 2rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    main {
        padding: 1rem;
    }

    .price-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

.wallet-status {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.wallet-status.connected {
    background-color: rgba(0, 255, 0, 0.1);
    color: #00ff00;
}

.wallet-status.error {
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

.wallet-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.price-preview {
    background-color: var(--card-background);
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    border: 1px solid var(--primary-color);
    display: block;
}

.preview-details {
    color: var(--text-color);
}

.preview-details p {
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
}

.preview-details p:first-child {
    margin-top: 0;
}

.preview-details p:last-child {
    margin-bottom: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.wallet-connect-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    /* margin-top: 1rem; */
}

.wallet-connect-group input {
    flex: 1;
}

.wallet-connect-group button {
    white-space: nowrap;
}

.setup-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 1rem;
    border: none;
    border-left: 3px solid var(--primary-color);
    background-color: var(--card-background);
    border-radius: 5px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1rem;
    background-color: var(--card-background);
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding-right: 2.5rem; /* Make room for the arrow */
}

/* Add a chevron/arrow icon */
.accordion-header::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

/* Rotate arrow when accordion is open */
.accordion-header[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Enhance hover state */
.accordion-header:hover {
    background-color: rgba(255, 215, 0, 0.1);
    padding-left: 1.2rem; /* Slight indent on hover */
}

/* Add subtle shadow on hover */
.accordion-header:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Add focus state for keyboard navigation */
.accordion-header:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.accordion-content {
    padding: 1rem;
    background-color: var(--card-background);
    display: none;
}

.accordion-content.active {
    display: block;
}

.wallet-connection {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--card-background);
    border-radius: 10px;
}

.wallet-connection h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-align: center;
}

.payment-wallet h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.amount-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    min-height: 24px;
}

.amount-label label {
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}

.current-discount {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.wallet-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.wallet-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 220px;
    flex: 1;
    justify-content: center;
    max-width: 300px;
}

.wallet-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Active wallet button styles */
.wallet-button.active {
    background: rgba(0, 102, 204, 0.2);
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
    position: relative;
}

.wallet-button.active::after {
    content: "Active";
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #0066cc;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.wallet-icon {
    width: 24px;
    height: 24px;
}

/* Wallet Setup Tutorial */
.setup-step {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.setup-step h4 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.setup-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 400px;
    object-fit: contain;
}

.setup-complete {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 128, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

.setup-complete h4 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

/* Remove unused card payment form styles */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

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

.equals-sign {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    padding: 0 15px;
    margin-top: 32px; /* Aligns with input boxes by accounting for label height */
}

/* Wallet Modal Styles */
.wallet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.wallet-modal-content {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary-color);
    display: flex;
    flex-direction: column;
}

.wallet-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.wallet-modal-icon {
    width: 40px;
    height: 40px;
}

.wallet-modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.wallet-modal-body {
    margin-bottom: 1.5rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.wallet-modal-body p {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.support-info a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.transaction-hash {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.support-info a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}
.wallet-modal-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-number {
    background-color: var(--primary-color);
    color: var(--background-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.wallet-modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: auto;
    flex-shrink: 0;
}

.wallet-modal-footer .button {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.wallet-modal-footer .button.primary {
    background-color: var(--primary-color);
    color: var(--background-color);
}

.wallet-modal-footer .button.secondary {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.wallet-modal-footer .button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.wallet-modal-info {
    /* margin-top: 1rem;
    padding-top: 1rem; */
    /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
}

.wallet-modal-info p {
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.wallet-modal-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.wallet-modal-info li {
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
}

.wallet-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.wallet-list li {
    margin: 0;
    flex: 1;
    min-width: 140px;
}

.wallet-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 0.9rem;
}

.wallet-list a:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.wallet-list a:active {
    transform: translateY(0);
}

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

.form-container section {
    width: 100%;
    margin-bottom: 2rem;
}

.discount-cards {
    width: 100%;
}

.discount-card {
    width: 100%;
    padding: 1.5rem;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wallet-connection {
    width: 100%;
    padding: 1.5rem;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.purchase-form-container {
    width: 100%;
    padding: 1.5rem;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.token-prices {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 2rem;
}

.token-prices h2 {
    width: 100%;
    margin-bottom: 2rem;
}

.wallet-setup {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 2rem;
}

.wallet-setup h2 {
    width: 100%;
    margin-bottom: 2rem;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 320px;
    max-width: 450px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    animation: slideIn 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.notification.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
    color: #155724;
}

.notification.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.notification.info {
    background: linear-gradient(135deg, #cce5ff 0%, #b3d7ff 100%);
    border-left: 4px solid #007bff;
    color: #004085;
}

.notification.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
    color: #856404;
}

.notification-content {
    flex-grow: 1;
    margin-right: 10px;
    width: 100%;
}

.notification-message {
    margin: 0 0 10px 0;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

.notification-details {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.notification-details p {
    margin: 8px 0;
    word-break: break-word;
}

.notification-details a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.notification-details a:hover {
    text-decoration: underline;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
}

.error-details {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
    background: rgba(220, 53, 69, 0.1);
    padding: 8px;
    border-radius: 4px;
}

.solution-text {
    color: #28a745 !important;
    font-weight: 500 !important;
    background: rgba(40, 167, 69, 0.1);
    padding: 8px 10px;
    border-radius: 4px;
    margin: 8px 0 !important;
    border-left: 3px solid #28a745;
}

.help-text {
    background: rgba(0, 123, 255, 0.1);
    padding: 8px 10px;
    border-radius: 4px;
    margin: 8px 0 !important;
    font-style: italic;
    border-left: 3px solid #007bff;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.price-disclaimer {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-top: 1em;
    padding-top: 0.5em;
    border-top: 1px solid #eee;
}

.price-update-timer {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-color);
    opacity: 0.8;
}

.token-balance {
    margin-top: 8px;
    font-size: 0.9em;
    color: var(--text-color);
    padding: 4px 0;
}

.token-balance span {
    font-weight: 500;
    color: var(--primary-color);
    font-family: monospace;
    font-size: 1.1em;
}

.token-balance.error {
    color: #ff6b6b;
}

#connectHorizonWallet {
    margin-bottom: 1.5rem;
}

input[readonly] {
    background-color: var(--card-background);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: var(--primary-color);
    opacity: 0.8;
    cursor: default;
}

input[readonly]:focus {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    outline: none;
}

.wallet-setup .accordion-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.wallet-setup .accordion-content {
    padding: 1.5rem;
}

.wallet-setup .setup-accordion {
    margin-top: 1rem;
}

/* Adjust nested accordion styles */
.wallet-setup .accordion-item .accordion-item {
    margin-top: 1rem;
}

.wallet-setup .accordion-item .accordion-header {
    font-size: 1.1rem;
    padding: 0.8rem 1rem;
}

.wallet-setup .accordion-item .accordion-content {
    padding: 1rem;
}
