:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --success: #10B981;
    --danger: #EF4444;
    --radius: 24px;
    /* Increased radius */
    --btn-radius: 999px;
    /* Pill shape */
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

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

.app-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    height: 48px;
    width: auto;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
}

h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--btn-radius);
    /* Pill buttons */
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
    gap: 12px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: white;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #F1F5F9;
}

.btn-link {
    background: none;
    color: var(--text-muted);
    margin-top: 8px;
}

.btn-link:hover {
    color: var(--text-main);
    background: none;
}

/* User Profile Button Specifics */
.user-btn-content {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #E0E7FF;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
}

.user-id {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
}

/* User Profile Display (Above Buttons) */
.user-profile-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.user-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.user-name-large {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.user-id-large {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}


/* Specific Utilities */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

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

.divider {
    color: var(--text-muted);
    font-size: 12px;
    margin: 16px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
    margin: 0 10px;
}

/* Inputs */
.input-group label {
    display: block;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    /* Slightly less rounded than buttons */
    font-size: 14px;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.help-link {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: underline;
    margin-bottom: 16px;
    text-align: center;
    cursor: pointer;
}

.help-link:hover {
    color: var(--primary-hover);
}

/* Icons & Simulation */
.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #EFF6FF;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon {
    background: #ECFDF5;
    color: var(--success);
}

.error-icon {
    background: #FEF2F2;
    color: var(--danger);
}

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #E2E8F0;
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* Floating Debug Panel */
.debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    z-index: 1000;
    overflow: hidden;
    min-width: 200px;
}

.debug-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.debug-icon {
    font-size: 14px;
}

.debug-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    width: 100%;
    margin-bottom: 0;
    border-radius: 8px;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #0d9668;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* App Download Section */
.app-download-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed var(--border-color);
    width: 100%;
}

.download-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.store-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    /* Ensure they stay side-by-side unless very narrow */
    flex-wrap: nowrap;
}

.store-btn {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    /* Smaller width constraints */
    min-width: 120px;
    flex: 1;
    max-width: 150px;
    height: 42px;
}

.store-btn:hover {
    background-color: #F8FAFC;
    border-color: var(--text-muted);
}

.store-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.small-text {
    font-size: 8px;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.large-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.ios-btn .store-icon,
.android-btn .store-icon {
    color: var(--text-main);
}