/* SafeDate Check Bot - Main Styles with Custom Logo */
:root {
    /* Primary Colors - matching logo */
    --pink-primary: #CF588B;
    --pink-light: #E8A4C0;
    --pink-dark: #A8406E;
    --pink-bg: #D45B8E;

    /* Grey Scale */
    --grey-primary: #5D5D5D;
    --grey-light: #9A9A9A;
    --grey-lighter: #C5C5C5;
    --grey-bg: #EAE8E9;

    /* Base Colors */
    --white: #FFFFFF;
    --black: #1D1C1A;
    --dark-bg: #1A1A1A;

    /* Status Colors */
    --green: #4CAF50;
    --green-light: #E8F5E9;
    --yellow: #FFC107;
    --yellow-light: #FFF8E1;
    --red: #F44336;
    --red-light: #FFEBEE;

    /* Typography */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background: var(--grey-bg);
    color: var(--black);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--pink-light);
    border-radius: var(--radius-full);
}

/* Container */
.app-container {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--white);
    position: relative;
    overflow-x: hidden;
}

/* Header with Logo */
.app-header {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--pink-dark) 100%);
    color: var(--white);
    padding: var(--space-lg) var(--space-md);
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.header-content {
    position: relative;
    z-index: 1;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.logo-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--white);
    opacity: 0.9;
}

.logo-text span.pink {
    color: var(--pink-light);
    opacity: 1;
}

.header-subtitle {
    font-size: 0.875rem;
    opacity: 0.85;
    font-weight: 400;
    margin-left: 48px;
}

/* Balance Badge */
.balance-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    z-index: 2;
}

.balance-icon {
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin: var(--space-md);
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--black);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--grey-light);
    margin-bottom: var(--space-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--pink-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(207, 88, 139, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(207, 88, 139, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--grey-bg);
    color: var(--grey-primary);
}

.btn-secondary:hover {
    background: var(--grey-lighter);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--pink-primary);
    color: var(--pink-primary);
}

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

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--grey-primary);
    margin-bottom: var(--space-xs);
}

.form-input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--grey-bg);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--black);
    background: var(--white);
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--pink-primary);
}

.form-input::placeholder {
    color: var(--grey-lighter);
}

/* Phone Input */
.phone-input-wrapper {
    position: relative;
}

.phone-prefix {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey-light);
    font-weight: 500;
}

.phone-input {
    padding-left: 48px;
}

/* Status Indicators */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-green {
    background: var(--green-light);
    color: var(--green);
}

.status-yellow {
    background: var(--yellow-light);
    color: #F57F17;
}

.status-red {
    background: var(--red-light);
    color: var(--red);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--grey-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--space-sm) 0;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.progress-green { background: var(--green); }
.progress-yellow { background: var(--yellow); }
.progress-red { background: var(--red); }

/* Risk Score Circle */
.risk-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    position: relative;
}

.risk-circle::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 4px solid transparent;
}

.risk-score-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.risk-score-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--space-xs);
}

/* Category Items */
.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--grey-bg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.category-item:hover {
    transform: translateX(4px);
    background: var(--pink-light);
}

.category-info {
    flex: 1;
}

.category-name {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.category-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pink-primary);
}

/* Intensity Scale */
.intensity-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.intensity-option {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    background: var(--grey-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.intensity-option:hover {
    background: var(--pink-light);
    border-color: var(--pink-primary);
}

.intensity-option.selected {
    background: var(--pink-primary);
    color: var(--white);
    border-color: var(--pink-primary);
}

.intensity-radio {
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 50%;
    margin-right: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.intensity-option.selected .intensity-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: currentColor;
    border-radius: 50%;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

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

.animate-slide-up {
    animation: slideUp 0.3s ease forwards;
}

/* Onboarding with Logo */
.onboarding-card {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--pink-dark) 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.onboarding-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.onboarding-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    position: relative;
    z-index: 1;
}

.onboarding-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.onboarding-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.onboarding-text {
    font-size: 0.875rem;
    opacity: 0.9;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--white);
    border-top: 1px solid var(--grey-bg);
    display: flex;
    justify-content: space-around;
    padding: var(--space-sm) 0;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    color: var(--grey-light);
    text-decoration: none;
    font-size: 0.625rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--pink-primary);
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, var(--grey-bg) 25%, var(--grey-lighter) 50%, var(--grey-bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--black);
    color: var(--white);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--green);
}

.toast-error {
    background: var(--red);
}

/* Logo in various places */
.app-logo-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.app-logo-medium {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.app-logo-large {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Splash screen */
.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--pink-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    width: 120px;
    height: 120px;
    margin-bottom: var(--space-lg);
    animation: pulse 2s infinite;
}

.splash-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.splash-text {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.splash-subtext {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    margin-top: var(--space-sm);
}

/* Responsive */
@media (max-width: 430px) {
    .app-container {
        max-width: 100%;
    }
}

/* Safe padding for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
    .app-header {
        padding-top: calc(var(--space-lg) + env(safe-area-inset-top));
    }
    .bottom-nav {
        padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom));
    }
}
