:root {
    --bg-color: #121826;
    --text-color: #e2e8f0;
    --text-color-secondary: #94a3b8;
    --accent-color: #25a1e2;
    --accent-color-hover: #1e8dca;
    --card-bg-color: #1e293b;
    --border-color: #334155;
}

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

html, body, #root {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
      'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
      sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    width: 100%;
    max-width: 420px;
    height: 100%;
    position: relative;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15vh;
    animation: fadeIn 1s ease-in-out;
}

.logo {
    width: 140px;
    height: auto;
    margin-bottom: 2rem;
}

.title {
    font-size: 1.75rem; /* 28px */
    font-weight: 700;
    margin: 0;
}

.subtitle {
    font-size: 1.125rem; /* 18px */
    color: var(--text-color-secondary);
    margin: 0.75rem 0 0;
    line-height: 1.5;
    max-width: 300px;
}

.continue-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background-color: var(--accent-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    margin-bottom: 20px;
    animation: slideInUp 0.8s ease-out;
}

.continue-button:hover, .continue-button:focus {
    background-color: var(--accent-color-hover);
    outline: none;
}

.continue-button:active {
    transform: scale(0.98);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Auth Screen Styles */

.auth-container {
    justify-content: flex-start;
    padding-bottom: 90px; /* Space for the fixed button */
}

.auth-content {
    width: 100%;
    animation: fadeIn 0.5s ease-in-out;
    text-align: left;
    overflow-y: auto;
    flex-grow: 1;
    margin-top: 2rem;
    padding-right: 5px; /* space for scrollbar */
}

.auth-content::-webkit-scrollbar {
  width: 4px;
}
.auth-content::-webkit-scrollbar-track {
  background: transparent;
}
.auth-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}
.auth-content::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

.logo-small {
    display: block;
    width: 80px;
    height: auto;
    margin: 0 auto 1.5rem;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.4;
    text-align: center;
}

.auth-subtitle {
    font-size: 1rem;
    color: var(--text-color-secondary);
    margin: 0 0 1.5rem;
    line-height: 1.5;
    text-align: center;
}

.steps-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.steps-list li {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.steps-list li p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
}

.step-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    display: block;
}

.bot-username {
    background-color: var(--bg-color);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: monospace;
    cursor: pointer;
    color: var(--accent-color);
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.bot-username:hover {
    background-color: var(--border-color);
}

.steps-list code {
    background-color: var(--bg-color);
    padding: 0.1rem 0.1rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
}

.auth-container .continue-button {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    animation: none; /* No animation for fixed-like button */
}

/* Checking Screen Styles */
.checking-content {
    justify-content: center;
    flex-grow: 1;
    margin-top: 0;
    padding-bottom: 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.checking-logo {
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Error Screen Styles */
.error-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    padding-bottom: 2rem;
}

.error-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    animation: animateCross 0.5s ease-out;
    user-select: none;
}

@keyframes animateCross {
    from {
        transform: scale(0.5) rotate(-90deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.error-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: #f87171; /* A light red color for error */
}

.error-text {
    font-size: 1rem;
    color: var(--text-color-secondary);
    line-height: 1.6;
    margin: 0 auto 1.5rem;
    max-width: 340px;
}

.error-list {
    list-style-type: none;
    padding: 0;
    margin: 0 auto 1.5rem;
    text-align: left;
    display: inline-block; /* To center the block */
    background-color: var(--card-bg-color);
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    border: 1px solid #f87171;
}

.error-list li {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
    font-weight: 600;
}

.error-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.error-list li:not(:last-child) {
    margin-bottom: 0.5rem;
}