/* public/assets/style.css */

:root {
    --bg-color: #fcfcfc;
    --text-color: #333;
    --accent-color: #222;
    --subtle-color: #888;
    --border-color: #eee;
    --success-color: #4CAF50;
    --error-color: #f44336;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    position: relative;
    min-height: 100vh;
}

#app {
    width: 100%;
    max-width: 480px;
    /* Mobile focused */
    padding: 20px;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.02);
}

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

.center-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 80vh;
    text-align: center;
}

/* Typography */
h1 {
    font-weight: 300;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-weight: 400;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--subtle-color);
}

p {
    margin-bottom: 1.5rem;
}

/* Forms */
input[type="email"],
input[type="text"] {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

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

button {
    cursor: pointer;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    transition: opacity 0.2s;
}

button:active {
    opacity: 0.8;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    width: 100%;
}

.btn-secondary {
    background-color: transparent;
    border: 1px dashed var(--subtle-color);
    color: var(--subtle-color);
    width: 100%;
    padding: 12px;
}

.btn-link {
    background: none;
    color: var(--subtle-color);
    text-decoration: underline;
    font-size: 0.9rem;
    padding: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    width: auto;
}

/* Views */
.view-login h1 {
    margin-bottom: 0.5rem;
}

.view-login .tagline {
    font-family: "SN Pro", sans-serif;
    font-weight: 300;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.view-login input[type="email"],
.view-login input[type="text"] {
    text-align: center;
}

.view-login input[type="text"]::placeholder {
    text-align: center;
}

.remember-me {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    color: var(--subtle-color);
    font-size: 0.9rem;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Dashboard */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-top: 10px;
}

.streak-badge {
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 500;
}

.btn-icon {
    padding: 8px;
    background: transparent;
    color: var(--subtle-color);
}

.hero {
    text-align: center;
    margin-bottom: 60px;
    background-image: url('/assets/altar_background_hero.png');
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    color: #fff;
    min-height: 222px;
    max-height: 222px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: min-height 0.5s ease, opacity 0.5s ease;
    animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero.checked {
    min-height: 222px;
    max-height: 222px;
    /* Show more of the altar when done */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    /* Darken image for better contrast */
    z-index: 1;
}

.btn-checkin {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    /* Semi-transparent background */
    backdrop-filter: blur(10px);
    /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    /* Ensure button is above the overlay */
    transition: transform 0.1s, background 0.3s, border-color 0.3s;
}

.btn-checkin:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-checkin:disabled {
    border-color: var(--border-color);
    color: var(--subtle-color);
    cursor: default;
}

.checkin-done-icon {
    font-size: 4rem;
    display: block;
    line-height: 1;
    margin-top: -10px;
    color: var(--success-color);
}

/* Intentions List */
.intentions ul {
    list-style: none;
    margin-bottom: 20px;
}

.intention-card {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.intention-text {
    flex: 1;
    font-size: 1.1rem;
}

.intention-actions button {
    padding: 5px 10px;
    background: none;
    color: #ccc;
    font-size: 1.2rem;
}

.intention-actions button:hover {
    color: var(--error-color);
}

.msg {
    color: var(--error-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

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

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

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Streak Pill */
.streak-pill {
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Help Text */
.help-text {
    margin-top: 30px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: left;
}

.help-text p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 8px;
    margin-left: 10px;
}

.help-text p:last-child {
    margin-bottom: 0;
}

#checkin-status-msg {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    font-size: 1.1rem;
    color: #fff;
    font-family: "SN Pro", sans-serif;
    font-weight: 300;
    font-style: normal;
    z-index: 2;
    animation: fadeIn 0.8s ease;
}