:root {
    --bg-color: #050a0f;
    --card-bg: #101c26;
    --accent: #fca311;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: #1e293b;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    background: linear-gradient(to bottom, #101c26, #050a0f);
    border-bottom: 1px solid var(--border-color);
}

.nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.nav-bar a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.nav-bar a.active {
    background-color: var(--accent);
    color: #000;
}

.nav-bar a:hover:not(.active) {
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--text-primary);
}

.header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.header img {
    height: 15vh;
    width: auto;
}

header h1 {
    font-size: 3.5rem;
    color: var(--accent);
    margin: 0;
    line-height: 1;
}

.subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
}

.header-links {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    min-width: 180px;
}

.btn:hover {
    background-color: #24292e;
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.legend {
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

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

.intro-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 60px;
    border: 1px solid var(--border-color);
}

.grid-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

h3 {
    color: var(--accent);
    font-size: 1rem;
}

.flow-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.user-flow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 20px;
    row-gap: 60px;
    margin-top: 60px;
}

.flow-step,
.flow-step1 {
    flex: 0 1 calc(25% - 20px);
    min-width: 220px;
    max-width: 250px;
    position: relative;
}

.flow-step2 {
    flex: 0 1 100%;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    position: relative;
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content {
    background: var(--card-bg);
    padding: 35px 15px 20px 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    overflow: hidden;
}

.step-content1 {
    background: var(--card-bg);
    padding: 35px 15px 20px 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    overflow: hidden;
}

.step-content2 {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.step-content img,
.step-content1 img {
    width: 100%;
    max-width: 160px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    flex: 0 0 auto;
}

.step-content2 img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.step-content h3,
.step-content1 h3,
.step-content2 h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--accent);
    flex: 0 0 auto;
}

.step-content p,
.step-content1 p,
.step-content2 p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin: 10px 0 0 0;
    width: 100%;
    word-break: break-word;
}

.step-content:hover,
.step-content1:hover,
.step-content2:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

th, td {
    padding: 5px 10px;
    text-align: left;
}

.charts {
    width: 40rem;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
}

em img.charts {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 1024px) {
    .flow-step,
    .flow-step1 {
        flex: 0 1 calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    header {
        padding: 40px 16px;
    }

    .nav-bar {
        gap: 10px;
        padding: 10px 0;
    }

    .nav-bar a {
        flex: 1 1 30%;
        padding: 10px 12px;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 10px;
        min-width: 110px;
    }

    .grid-info {
        grid-template-columns: 1fr;
    }

    .flow-step,
    .flow-step1 {
        flex: 0 1 100%;
        max-width: 420px;
    }

    .step-content,
    .step-content1 {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .step-content img,
    .step-content1 img {
        max-width: 100%;
    }

    header h1 {
        font-size: 2rem;
    }

    .header img {
        height: 10vh;
    }

    .header-links {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: 12px;
    }

    .btn {
        width: 100%;
        min-width: 0;
    }

    .step-content2 {
        padding: 12px;
        max-width: 100%;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 16px;
    }
}
