:root {
    /* Brand Colors */
    --bg-gradient-start: #F0F8FF;
    --bg-gradient-end: #E6F4F9;
    --primary-blue: #098DE6;
    --primary-blue-dark: #0077C8;
    --text-primary: #1C1C1E;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --card-bg: #FFFFFF;
    --input-bg: #F9FAFB;
    --success-green: #34C759;
    --error-red: #EF4444;
    
    /* Spacing */
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html, body {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden; /* No scrollbars on body */
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at 50% 0%, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
}

/* --- Screen Logic --- */
.screen {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    overflow-y: auto; /* Allow scroll within screen if needed */
    display: none;
    /* Center content by default */
    display: none; /* Override flex if not active, JS handles block/flex */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Ensure screens are flex when shown to center content */
.screen[style*="display: block"] {
    display: flex !important;
}

#page-index {
    display: flex; /* Show first page by default */
}

/* Content Containers */
.content-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* --- Component Styles --- */

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-transparent {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* Typography */
.title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 32px;
    max-width: 320px;
}

/* Logos */
.logo-img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 12px 24px rgba(9, 141, 230, 0.2);
    margin-bottom: 24px;
}

.logo-img-small {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    margin-bottom: 20px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 12px rgba(9, 141, 230, 0.3);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    width: 100%;
    background: white;
    color: var(--primary-blue);
    border: 1px solid rgba(9, 141, 230, 0.2);
    border-radius: var(--border-radius-md);
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.btn-secondary:hover {
    background: #F0F9FF;
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Inputs */
.input-group {
    width: 100%;
    margin-bottom: 24px;
    position: relative;
}

.input-field {
    width: 100%;
    padding: 16px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: var(--input-bg);
    transition: border-color 0.2s;
    outline: none;
}

.input-field:focus {
    border-color: var(--primary-blue);
    background: white;
}

textarea.input-field {
    min-height: 140px;
    resize: none;
    line-height: 1.5;
}

/* Validation Feedback */
.input-field.error {
    border-color: var(--error-red);
}

.error-message {
    color: var(--error-red);
    font-size: 13px;
    margin-top: 6px;
    display: none;
    text-align: left;
    width: 100%;
}

.error-message.visible {
    display: block;
}

/* Header (Back Btn) */
.view-header {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 20px;
    margin-bottom: 10px;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    color: var(--text-primary);
}

.back-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* Features List (Home) */
.feature-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    margin-bottom: 12px;
}

.check-icon {
    width: 24px;
    height: 24px;
    background: var(--success-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.check-icon svg {
    width: 14px;
    height: 14px;
    stroke: white;
    stroke-width: 3;
}

.feature-text {
    font-size: 14px;
    font-weight: 500;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.tab-item {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.tab-item.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    font-weight: 600;
}

/* Loader */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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