/* styles.css */

:root {
    --primary-color: #1a5483;
    --secondary-color: #3a7ab3;
    --background-color: #f0f5fa;
    --text-color: #333333;
    --card-background: #ffffff;
    --accent-color: #ffa500;
    --error-color: #d32f2f;
    --success-color: #388e3c;
    --note-color: #666666;
}

html {
    font-size: 16px;
}

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

.container {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
}

h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 0.9375rem;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
    margin-right: auto;
    white-space: nowrap;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin-left: 1.25rem;
}

nav ul li:first-child {
    margin-left: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.3125rem 0.625rem;
    border-radius: 0.3125rem;
    transition: background-color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    background-color: var(--secondary-color);
}

.user-info-header {
    padding: 0.3125rem 0.625rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.3125rem;
}

main {
    padding: 1.25rem 0;
}

.section {
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.info-item {
    background-color: var(--card-background);
    border: 0.0625rem solid var(--primary-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(26, 84, 131, 0.1);
}

.info-item h4 {
    color: var(--secondary-color);
    margin-bottom: 0.625rem;
}

.value {
    font-weight: bold;
}

.large-value {
    color: var(--secondary-color);
    font-size: 2em;
    font-weight: bold;
}

form {
    margin-top: 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group > *:first-child {
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: block;
}

label {
    display: block;
    margin-bottom: 0.3125rem;
    color: var(--text-color);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--primary-color);
    border-radius: 0.3125rem;
    font-size: 1rem;
    background-color: var(--card-background);
}

.payment-options,
.network-options {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.payment-option,
.network-option {
    padding: 0.5rem 1rem;
    background-color: var(--card-background);
    border: 1px solid var(--primary-color);
    border-radius: 0.3125rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.payment-option.active,
.network-option.active,
.network-option:hover {
    background-color: var(--primary-color);
    color: white;
}

button, .submit-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.3125rem;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
    font-weight: bold;
    display: inline-block;
}

button:hover, .submit-button:hover {
    background-color: var(--secondary-color);
}

.note {
    font-size: 0.9rem;
    color: var(--note-color);
    margin-top: 0.5rem;
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.25rem;
    background-color: var(--card-background);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--primary-color);
}

th {
    background-color: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.status.completed {
    color: var(--success-color);
}

.status.processing {
    color: var(--accent-color);
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 1.25rem;
}

/* QRコードのスタイル */
.qr-code {
    text-align: center;
    margin: 1rem 0;
}

.qr-code img {
    max-width: 100%;
    height: auto;
}

/* 支払い情報のスタイル */
.payment-info {
    background-color: var(--card-background);
    border: 1px solid var(--primary-color);
    border-radius: 0.3125rem;
    padding: 1rem;
    margin-top: 1rem;
}

.payment-info h4 {
    margin-top: 0;
}

/* Responsive design */
@media screen and (max-width: 48rem) {
    header .container {
        flex-wrap: wrap;
        justify-content: center;
    }

    header h1 {
        margin-right: 0;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 0.3125rem 0.625rem;
    }

    .user-info-header {
        margin-top: 1rem;
        width: 100%;
        text-align: center;
    }

    .payment-options,
    .network-options {
        flex-direction: column;
    }

    .payment-option,
    .network-option {
        width: 100%;
        text-align: center;
    }
}

/* auth.css */

.auth-container {
    max-width: 25rem;
    margin: 3.125rem auto;
    padding: 1.875rem;
    background-color: var(--card-background);
    border-radius: 0.625rem;
    box-shadow: 0 0 1.25rem rgba(0, 0, 0, 0.1);
}

.auth-container h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
}

.auth-container h2 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 1.875rem;
}

.auth-container p {
    text-align: center;
    margin-top: 1.25rem;
}

.auth-container a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-container a:hover {
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.625rem;
}

.checkbox-group label {
    font-size: 0.9em;
    color: var(--text-color);
}

/* settings.css */

#settings {
    background-color: var(--card-background);
    border-radius: 0.625rem;
    box-shadow: 0 0 1.25rem rgba(0, 0, 0, 0.2);
    padding: 1.875rem;
    margin-top: 1.875rem;
    margin-bottom: 1.875rem;
    color: var(--text-color);
}

#settings h2 {
    color: var(--primary-color);
    margin-bottom: 1.875rem;
    text-align: center;
    font-size: 2.5em;
}

.settings-container {
    display: flex;
    flex-grow: 1;
    gap: 1.875rem;
}

.tabs {
    display: flex;
    flex-direction: column;
    width: 12.5rem;
    flex-shrink: 0;
}

.tab-button {
    background-color: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0.9375rem 1.25rem;
    text-align: left;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: rgba(26, 84, 131, 0.1);
}

.tab-button.active {
    color: var(--primary-color);
    background-color: rgba(26, 84, 131, 0.2);
    border-left: 0.25rem solid var(--primary-color);
}

.tab-content {
    display: none;
    flex-grow: 1;
    padding: 1.25rem;
    background-color: var(--card-background);
    border-radius: 0.625rem;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.tab-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 2em;
}

#logout p {
    margin-bottom: 1.25rem;
    font-size: 1.1em;
}

#logoutButton {
    background-color: var(--error-color);
    color: white;
}

#logoutButton:hover {
    background-color: #b71c1c;
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media screen and (max-width: 48rem) {
    .mobile-menu-button {
        display: block;
    }

    nav ul {
        display: none;
    }

    nav ul.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 1rem;
    }

    nav ul.show li {
        margin: 0.5rem 0;
    }

    header .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    header h1 {
        margin-right: 0;
    }

    .user-info-header {
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }

    .settings-container {
        flex-direction: column;
    }

    .tabs {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        margin-bottom: 1.25rem;
    }

    .tab-button {
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .tab-button.active {
        border-left: none;
        border-bottom: 0.25rem solid var(--primary-color);
    }

    .tab-content {
        padding: 0.9375rem;
    }
}

/* Transaction History Tabs のための新しいCSS */

.transaction-history-tabs {
    margin-top: 2rem;
    background-color: var(--card-background, #ffffff);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.transaction-tabs {
    display: flex;
    justify-content: flex-start;
    border-bottom: 2px solid var(--primary-color, #1a5483);
    padding: 0;
    margin: 0;
}

.transaction-tab-button {
    flex: 0 1 auto;
    background-color: transparent;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color, #333333);
    transition: background-color 0.3s, color 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
}

.transaction-tab-button:hover {
    background-color: rgba(26, 84, 131, 0.1);
}

.transaction-tab-button.active {
    color: var(--primary-color, #1a5483);
    border-bottom-color: var(--primary-color, #1a5483);
    font-weight: bold;
}

.transaction-tab-content {
    display: none;
    padding: 1rem;
}

.transaction-tab-content.active {
    display: block;
}

/* レスポンシブデザインの調整 */
@media screen and (max-width: 48rem) {
    .transaction-tabs {
        flex-wrap: wrap;
    }

    .transaction-tab-button {
        flex: 1 1 auto;
        padding: 0.75rem 1rem;
    }
}

/* Add these styles to your existing CSS file */

.redeemable-purchases table,
.redemption-history table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.25rem;
    background-color: var(--card-background);
}

.redeemable-purchases th,
.redeemable-purchases td,
.redemption-history th,
.redemption-history td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--primary-color);
}

.redeemable-purchases th,
.redemption-history th {
    background-color: var(--secondary-color);
    color: white;
    font-weight: bold;
}

.redeem-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.3125rem;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
}

.redeem-button:hover {
    background-color: var(--secondary-color);
}

.status.completed {
    color: var(--success-color);
}

.status.processing {
    color: var(--accent-color);
}

@media screen and (max-width: 48rem) {
    .redeemable-purchases table,
    .redemption-history table {
        border: 0;
    }

    .redeemable-purchases table thead,
    .redemption-history table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    .redeemable-purchases table tr,
    .redemption-history table tr {
        border-bottom: 3px solid var(--primary-color);
        display: block;
        margin-bottom: .625em;
    }

    .redeemable-purchases table td,
    .redemption-history table td {
        border-bottom: 1px solid var(--primary-color);
        display: block;
        font-size: .8em;
        text-align: right;
    }

    .redeemable-purchases table td::before,
    .redemption-history table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
    }

    .redeemable-purchases table td:last-child,
    .redemption-history table td:last-child {
        border-bottom: 0;
    }
}
