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

:root {
    --orange: #f39c12;
    --orange-dark: #b8651c;
    --green-dark: #162017;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.68);
    --border: rgba(255, 255, 255, 0.1);
    --danger: #ff4757;
}

html {
    min-height: 100%;
    background-color: var(--green-dark);
}

body {
    position: relative;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    padding: 20px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;

    background-size: cover;
    background-position: center;
}

body.login-page::before {
    background-image: linear-gradient(
            rgba(0, 0, 0, 0.62),
            rgba(0, 0, 0, 0.45)
    ),
    url('/images/scarif.jpg');
}

body.profile-page::before {
    background-image: linear-gradient(
            rgba(0, 0, 0, 0.62),
            rgba(0, 0, 0, 0.45)
    ),
    url('/images/at-at.jpg');
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

.brand {
    --brand-size: 46px;

    display: inline-flex;
    align-items: center;
    gap: 0.3em;

    font-size: var(--brand-size);
    line-height: 1;
}

.brand-mark {
    width: 1.7em;
    height: 1.7em;
    flex: 0 0 auto;
    object-fit: contain;
}

.brand-name {
    font-weight: 700;
    letter-spacing: 0.01em;

    background: linear-gradient(135deg, #ef903d, #f39c12);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-header .brand {
    margin-bottom: 20px;
}

.page-title h1 {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-title h1::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 14px;
    border-radius: 2px;
    background: linear-gradient(90deg, #ef903d, #f39c12);
}

.page-container {
    min-height: calc(100vh - 40px);

    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-card,
.auth-card,
.sessions-section {
    background: rgba(22, 32, 23, 0.50);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid var(--border);
    border-radius: 20px;

    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.15);

    animation: fadeIn 0.6s ease-out;
}

.no-animate .sessions-section {
    animation: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    width: min(92vw, 760px);
    padding: 56px;
}

.auth-header {
    text-align: center;
}

.auth-header p {
    max-width: none;

    color: var(--text-muted);

    font-size: 17px;
    line-height: 1.65;
    text-align: justify;
}

.auth-header .auth-legal {
    margin-top: 18px;

    font-size: 15px;
    line-height: 1.6;
    color: rgb(255 255 255 / 0.6);
}

.auth-header a {
    color: var(--orange);
    text-decoration: underline;
    text-decoration-color: rgba(243, 156, 18, 0.4);
    text-underline-offset: 3px;

    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.auth-header a:hover {
    color: #ffb347;
    text-decoration-color: currentColor;
}

.login-actions {
    margin-top: 32px;
}

.google-button {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 100%;

    padding: 14px 20px;

    color: #202124;
    background: #ffffff;

    border: none;
    border-radius: 12px;

    text-decoration: none;

    font-size: 16px;
    font-weight: 600;

    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

    background: #f8f9fa;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.google-button:active {
    transform: translateY(0);
}

.google-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;

    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-footer {
    margin-top: 24px;

    text-align: center;

    color: rgba(255, 255, 255, 0.42);

    font-size: 14px;
}

.profile-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    padding: 20px 0 30px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.sessions-section {
    padding: 30px;
}

.section-heading {
    margin-bottom: 22px;
}

.section-heading h2 {
    color: #ffffff;

    font-size: 22px;
    font-weight: 600;
}

.section-heading p {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 14px;
    line-height: 1.5;
}

.section-heading > button {
    margin-top: 16px;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.session-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    padding: 20px;

    background: rgba(255, 255, 255, 0.035);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;

    transition: background 0.2s ease, border-color 0.2s ease;
}

.session-card:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.13);
}

.current-session {
    border-color: rgba(243, 156, 18, 0.35);

    background: linear-gradient(
            135deg,
            rgba(243, 156, 18, 0.08),
            rgba(255, 255, 255, 0.03)
    );
}

.session-main {
    min-width: 0;

    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.session-icon {
    flex: 0 0 44px;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: rgba(243, 156, 18, 0.12);
    color: var(--orange);
}

.session-icon svg {
    width: 23px;
    height: 23px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.session-info {
    min-width: 0;
}

.session-title {
    color: #ffffff;

    font-size: 16px;
    font-weight: 600;

    word-break: break-word;
}

.session-details {
    display: flex;
    flex-direction: column;
    gap: 5px;

    margin-top: 9px;
}

.session-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    font-size: 13px;
    line-height: 1.4;
}

.session-detail-label {
    color: rgba(255, 255, 255, 0.42);
}

.session-detail-value {
    color: rgba(255, 255, 255, 0.72);

    word-break: break-word;
}

.session-actions {
    flex-shrink: 0;
}

.primary-button,
.secondary-button,
.danger-button {
    padding: 11px 17px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary-button {
    color: #ffffff;

    border: none;

    background: linear-gradient(
            135deg,
            #e67e22,
            #b8651c
    );
}

.secondary-button {
    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.15);

    background: rgba(255, 255, 255, 0.06);
}

.danger-button {
    color: #ff8d98;

    border: 1px solid rgba(255, 71, 87, 0.25);

    background: rgba(255, 71, 87, 0.08);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.danger-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.danger-button:hover:not(:disabled) {
    background: rgba(255, 71, 87, 0.14);
}

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

.empty-sessions {
    padding: 25px;

    color: var(--text-muted);

    text-align: center;

    background: rgba(255, 255, 255, 0.025);

    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;

    font-size: 14px;
}

.error-card {
    width: 100%;
    max-width: 450px;

    padding: 40px;

    text-align: center;
}

.error-card h1 {
    font-size: 25px;
}

.error-card p {
    margin-top: 12px;

    color: var(--text-muted);

    line-height: 1.5;
}

.error-card .primary-button {
    margin-top: 25px;
}

.login-error {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 14px;

    width: 100%;
    margin-bottom: 32px;
    padding: 18px 48px 18px 18px;

    background: rgba(80, 24, 20, 0.55);
    border: 1px solid rgba(255, 100, 80, 0.35);
    border-left: 4px solid #ef5b45;

    border-radius: 16px;

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), 0 0 30px rgba(239, 91, 69, 0.08);

    animation: login-error-appear 0.25s ease-out;
}

.login-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
    flex: 0 0 28px;

    border: 2px solid rgba(255, 150, 130, 0.8);
    border-radius: 50%;

    color: #ffb0a0;
    font-weight: 800;
    font-size: 16px;
}

.login-error-content {
    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;
}

.login-error-content strong {
    color: #ffb0a0;
    font-size: 15px;
    font-weight: 700;
}

.login-error-message {
    color: rgba(255, 235, 230, 0.9);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.login-error-close {
    position: absolute;
    top: 10px;
    right: 12px;

    width: 32px;
    height: 32px;

    border: 0;
    background: transparent;

    color: rgba(255, 220, 215, 0.7);

    font-size: 26px;
    line-height: 1;

    cursor: pointer;

    border-radius: 8px;

    transition: color 0.2s ease, background 0.2s ease;
}

.login-error-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

@keyframes login-error-appear {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 700px) {
    body {
        padding: 10px;
    }

    .page-container {
        min-height: calc(100vh - 20px);
    }

    .auth-card {
        padding: 30px 20px;
    }

    .profile-header {
        align-items: flex-start;
        flex-direction: column;

        gap: 15px;

        padding: 12px 5px 20px;
    }

    .sessions-section {
        padding: 20px 15px;
    }

    .session-card {
        align-items: stretch;
        flex-direction: column;

        gap: 20px;

        padding: 17px;
    }

    .session-actions {
        width: 100%;
    }

    .session-actions button {
        width: 100%;
    }

    .brand {
        --brand-size: 34px;
    }

    .page-title h1 {
        font-size: 26px;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 25px 15px;
    }

    .auth-header p {
        font-size: 14px;
    }

    .sessions-section {
        border-radius: 15px;
    }
}
