/* =============================================
TX Visualizer — Apple-Style CSS
Path: /tx-visualizer/css/style.css
============================================= */

:root {
    --bg-light: #f9fafc;
    --bg-white: #ffffff;
    --text-main: #1c1c1e;
    --text-sub: #6e6e73;
    --border-soft: rgba(0, 0, 0, 0.08);
    --accent: #007aff;
    --radius: 14px;
    --shadow-small: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 8px 28px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-main);
    background: var(--bg-light);
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-light);
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- Header --- */
.site-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    background: transparent;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.site-sub {
    color: var(--text-sub);
    margin-top: 0.5rem;
    font-size: 1rem;
}

/* --- Input Form --- */
.tx-input-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

.tx-input-form input {
    flex: 1;
    min-width: 260px;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-soft);
    background: var(--bg-white);
    box-shadow: var(--shadow-small);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tx-input-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.cta-link {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    box-shadow: var(--shadow-small);
}

.cta-link:hover {
    background: #005edc;
}

.cta-link:active {
    transform: scale(0.98);
}

.status-message {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-sub);
}

.status-message.error {
    color: #d70015;
}

/* --- Visualizer Layout --- */
.visualizer-output {
    margin-top: 2rem;
}

.visualizer-output-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
    justify-content: center;
}

.io-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-large);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
}

.io-address {
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.io-value {
    margin-top: 0.4rem;
    font-weight: 600;
    color: var(--accent);
}

.io-extra {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-sub);
}

.center-column {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.tx-hash {
    font-family: monospace;
    font-weight: 700;
    font-size: 1.1rem;
}

.tx-meta {
    font-size: 0.9rem;
    color: var(--text-sub);
}

.arrow {
    font-size: 3rem;
    color: #d1d1d6;
    line-height: 1;
    user-select: none;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .visualizer-output-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .arrow {
        transform: rotate(90deg);
        font-size: 2.5rem;
    }
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
    color: var(--text-sub);
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* --- Accessibility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}