:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --gray-dark: #222222;
    --gray-light: #888888;
    --accent: #ffffff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobile bounds */
    height: 100vh;
    position: relative;
    background-color: var(--bg-color);
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-in-out;
    z-index: 0;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Flex Utilities */
.flex-center {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Typography & Logo */
.starlink-logo {
    font-weight: 800;
    letter-spacing: 0.3em;
    font-size: 2.2rem;
    text-align: center;
    text-transform: uppercase;
    margin-right: -0.3em; /* Offset letter spacing for centering */
}

.starlink-logo.small {
    font-size: 1.2rem;
    padding: 20px 0;
}

/* Screen 1 */
#screen-home .logo-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bottom-action {
    padding-bottom: 24px;
    width: 100%;
    transition: opacity 0.5s ease;
}

/* Buttons */
.btn-primary {
    background-color: var(--accent);
    color: var(--bg-color);
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Screen 2: Forms */
.top-bar {
    text-align: center;
    border-bottom: 1px solid var(--gray-dark);
    margin-bottom: 40px;
    margin-left: -24px;
    margin-right: -24px;
}

.form-container {
    flex: 1;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 40px;
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--gray-light);
    color: var(--text-color);
    font-size: 1rem;
    padding: 10px 0;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-bottom-color: var(--accent);
}

.input-group label {
    position: absolute;
    top: 10px;
    left: 0;
    color: var(--gray-light);
    font-size: 1rem;
    pointer-events: none;
    transition: 0.3s ease all;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -15px;
    font-size: 0.75rem;
    color: var(--text-color);
}

/* Screen 3 & 4: Loading */
.loading-text-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.loading-message {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-color);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.loading-message.visible {
    opacity: 1;
}

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
}

.connecting-text {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--gray-light);
    animation: pulse 2s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}
