:root {
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 120px 24px 60px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 40px 36px;
    position: relative;
    z-index: 1;
    animation: scaleIn 0.6s var(--ease-out) forwards;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 0 0 28px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-subtle);
}

.auth-tab {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.35s var(--ease-out);
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--crimson);
    transform: scaleX(0);
    transition: transform 0.35s var(--ease-out);
}

.auth-tab.active {
    color: var(--text-primary);
}

.auth-tab.active::after {
    transform: scaleX(1);
}

.auth-tab:hover:not(.active) {
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transform: translateY(8px);
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), visibility 0s 0.35s;
}

.auth-form.active {
    visibility: visible;
    opacity: 1;
    height: auto;
    overflow: visible;
    transform: translateY(0);
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), visibility 0s 0s;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group .optional {
    color: var(--text-dim);
    font-weight: 400;
}

.form-group input {
    padding: 12px 14px;
    background: var(--bg-black);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.form-group input:focus {
    border-color: var(--crimson);
    box-shadow: 0 0 0 3px rgba(212, 32, 32, 0.1);
}

.auth-submit {
    margin-top: 4px;
    width: 100%;
    justify-content: center;
}

.auth-error {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(212, 32, 32, 0.08);
    border: 1px solid rgba(212, 32, 32, 0.2);
    border-radius: 8px;
    color: var(--crimson-bright);
    font-size: 0.84rem;
    line-height: 1.4;
}

.dashboard-section {
    padding: 120px 24px 60px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease-out) 0.1s forwards;
}

.dashboard-header h1 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-header h1 span {
    color: var(--crimson);
}

.dash-sub-text {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 2px 0 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 28px 24px;
    opacity: 0;
    animation: fadeUp 0.5s var(--ease-out) forwards;
    transition: border-color 0.4s var(--ease-out),
                box-shadow 0.5s var(--ease-out),
                transform 0.4s var(--ease-out);
}

.dashboard-grid .dash-card:nth-child(1) { animation-delay: 0.15s; }
.dashboard-grid .dash-card:nth-child(2) { animation-delay: 0.25s; }
.dashboard-grid .dash-card:nth-child(3) { animation-delay: 0.35s; }

.account-card { animation-delay: 0.4s; }
.changelog-card { animation-delay: 0.45s; }

.dash-card:hover {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.dash-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 32, 32, 0.08);
    border-radius: 10px;
    color: var(--crimson);
    margin-bottom: 16px;
    transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

.dash-card:hover .dash-card-icon {
    background: rgba(212, 32, 32, 0.14);
}

.dash-card h3 {
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text-primary);
}

.dash-card-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--crimson);
    margin: 0 0 4px;
    text-transform: capitalize;
}

.dash-card-detail {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.download-btn {
    margin-top: 14px;
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.84rem;
}

.support-btn {
    margin-top: 14px;
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.84rem;
}

.dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.account-card {
    margin-bottom: 0;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.account-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.account-action:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.account-action-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px;
}

.account-btn {
    white-space: nowrap;
    padding: 10px 20px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    visibility: hidden;
    transition: background 0.3s var(--ease-out), backdrop-filter 0.3s var(--ease-out), visibility 0s 0.3s;
}

.modal-overlay.active {
    visibility: visible;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    transition: background 0.3s var(--ease-out), backdrop-filter 0.3s var(--ease-out), visibility 0s 0s;
}

.modal-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px 28px;
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.modal-overlay.active .modal-card {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 20px;
}

.modal-card .form-group {
    margin-bottom: 14px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    justify-content: center;
}

.modal-card .auth-error {
    margin-top: 8px;
    margin-bottom: 0;
}

.changelog-card {
    margin-top: 0;
}

.changelog-content {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.changelog-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(212, 32, 32, 0.1);
    border: 1px solid rgba(212, 32, 32, 0.2);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--crimson-bright);
    letter-spacing: 0.02em;
    width: fit-content;
}

.changelog-section {
    padding: 14px 16px;
    border-radius: 10px;
    border-left: 3px solid transparent;
}

.changelog-section--additions {
    background: rgba(212, 32, 32, 0.04);
    border-left-color: rgba(212, 32, 32, 0.4);
}

.changelog-section--removed {
    background: rgba(212, 32, 32, 0.04);
    border-left-color: rgba(212, 32, 32, 0.4);
}

.changelog-section--others {
    background: rgba(255, 255, 255, 0.02);
    border-left-color: rgba(255, 255, 255, 0.1);
}

.changelog-section-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.changelog-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.changelog-items li {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-left: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.changelog-prefix {
    font-weight: 700;
    font-size: 0.88rem;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.changelog-section--additions .changelog-prefix,
.changelog-section--removed .changelog-prefix {
    color: var(--crimson-bright);
    text-shadow: 0 0 8px rgba(212, 32, 32, 0.6);
}

.changelog-section--others .changelog-prefix {
    color: var(--text-dim);
}

.changelog-note-block {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.changelog-note-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.changelog-note-label svg {
    opacity: 0.6;
}

.changelog-note {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.changelog-empty {
    color: var(--text-dim);
    font-size: 0.84rem;
}

@media (max-width: 768px) {
    .dashboard-grid,
    .dashboard-bottom {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .dashboard-section {
        padding: 100px 16px 40px;
    }

    .auth-section {
        padding: 100px 16px 40px;
    }

    .auth-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
    }

    .dashboard-header h1 {
        font-size: 1.3rem;
    }
}
