* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #ddd6fe 100%);
    min-height: 100vh;
    color: #1f2937;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #e0f2fe 0%, #ddd6fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
}

.auth-page::before {
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.auth-page::after {
    bottom: -100px;
    right: -100px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) scale(1.1);
        opacity: 0.5;
    }
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 40px;
    animation: slideUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -5px rgba(0, 0, 0, 0.15);
}

.auth-card h1 {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
    text-align: center;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:nth-child(1) {
    animation: fadeIn 0.6s ease-out 0.5s both;
}

.form-group:nth-child(2) {
    animation: fadeIn 0.6s ease-out 0.6s both;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: #3b82f6;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-group input:focus::placeholder {
    opacity: 0.5;
    transform: translateX(5px);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    padding: 14px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out 0.7s both;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
}

.auth-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.auth-link a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: #3b82f6;
    transition: width 0.3s ease;
}

.auth-link a:hover::after {
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    animation: slideDown 0.4s ease-out, shake 0.5s 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-8px); }
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Main App */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    overflow-x: hidden;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    gap: 8px;
}

.user-info {
    color: #1f2937;
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.header-bar > div:last-child {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-logout {
    background: #ef4444;
    color: white;
    padding: 10px 20px;
}

.btn-logout:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #3b82f6;
    color: white;
    padding: 10px 20px;
}

.btn-secondary:hover {
    background: #2563eb;
}

.main-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 32px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.card-header h1 {
    font-size: 32px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.card-header p {
    color: #6b7280;
    font-size: 16px;
    word-wrap: break-word;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

.stat-card {
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.stat-green {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.stat-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.stat-purple {
    background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 100%);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-green .stat-number {
    color: #059669;
}

.stat-blue .stat-number {
    color: #2563eb;
}

.stat-purple .stat-number {
    color: #7c3aed;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
}

.btn-checkin {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.btn-checkin:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.4);
}

.btn-checkin:disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

.success-message {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-icon {
    font-size: 24px;
}

.message-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
}

.message-text {
    color: #b45309;
    word-wrap: break-word;
}

.calendar-container {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.calendar-nav {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.calendar-nav:hover {
    background: #e5e7eb;
}

.calendar-title {
    text-align: center;
}

.calendar-title h2 {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 4px;
}

.btn-today {
    background: transparent;
    border: none;
    color: #3b82f6;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-today:hover {
    text-decoration: underline;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    width: 100%;
}

.day-name {
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    font-size: 14px;
    padding: 8px 0;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: default;
}

.day-cell.empty {
    background: transparent;
}

.day-cell.future {
    background: #f3f4f6;
    color: #d1d5db;
}

.day-cell.checked {
    background: #10b981;
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.day-cell.today {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #3b82f6;
}

.day-cell.normal {
    background: white;
    color: #374151;
}

.day-check {
    font-size: 10px;
    margin-top: 2px;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-box.checked {
    background: #10b981;
}

.legend-box.today {
    background: #dbeafe;
    border: 2px solid #3b82f6;
}

.reminder-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 32px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.reminder-card h3 {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 20px;
}

.reminder-card ul {
    list-style: none;
}

.reminder-card li {
    padding: 12px 0;
    color: #374151;
    font-size: 15px;
    border-bottom: 1px solid #f3f4f6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.reminder-card li:last-child {
    border-bottom: none;
}

.celebration-card {
    background: linear-gradient(135deg, #34d399 0%, #3b82f6 100%);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.3);
    padding: 32px;
    text-align: center;
    color: white;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.celebration-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.celebration-card h3 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
}

.celebration-card p {
    font-size: 16px;
    opacity: 0.95;
}

/* Journal Styles */
.journal-prompt {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.journal-prompt-text {
    font-size: 16px;
    color: #92400e;
    margin-bottom: 12px;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.btn-journal {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-journal:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.journal-done {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 24px;
    color: #065f46;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    box-sizing: border-box;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #9ca3af;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #374151;
}

.modal-content h2 {
    color: #1f2937;
    margin-bottom: 24px;
    font-size: 24px;
}

/* Mood Selector */
.mood-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.mood-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mood-option:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.mood-option input[type="radio"] {
    display: none;
}

.mood-option input[type="radio"]:checked + .mood-emoji {
    transform: scale(1.3);
}

.mood-option input[type="radio"]:checked ~ .mood-label {
    color: #3b82f6;
    font-weight: 600;
}

.mood-option input[type="radio"]:checked + .mood-emoji + .mood-label {
    color: #3b82f6;
}

.mood-option:has(input[type="radio"]:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.mood-emoji {
    font-size: 40px;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.mood-label {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* Craving Slider */
.craving-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #10b981 0%, #fbbf24 50%, #ef4444 100%);
    outline: none;
    -webkit-appearance: none;
    margin: 12px 0;
}

.craving-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.craving-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.craving-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}

#cravingValue {
    font-weight: bold;
    color: #3b82f6;
    font-size: 18px;
}

/* Journal Page Styles */
.journal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.journal-stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 20px;
    border-radius: 12px;
}

.journal-stat-item .stat-icon {
    font-size: 32px;
}

.journals-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.journal-entry {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.journal-entry:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
}

.journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.journal-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1f2937;
}

.date-icon {
    font-size: 20px;
}

.journal-mood {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mood-emoji-large {
    font-size: 32px;
}

.mood-text {
    font-weight: 600;
    color: #374151;
}

.journal-craving {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.craving-label {
    font-weight: 500;
    color: #6b7280;
}

.craving-stars {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 18px;
    opacity: 0.3;
}

.star.filled {
    opacity: 1;
}

.craving-number {
    font-weight: 600;
    color: #3b82f6;
}

.journal-note {
    background: #fffbeb;
    border-left: 4px solid #fbbf24;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.journal-note p {
    color: #78350f;
    line-height: 1.6;
    margin: 0;
}

.journal-footer {
    text-align: right;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #1f2937;
    font-size: 24px;
    margin-bottom: 12px;
}

/* Swipeable Container */
.swipeable-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
}

.sections-container {
    display: flex;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    touch-action: pan-y;
    width: 100%;
}

.sections-container.dragging {
    transition: none;
    touch-action: none;
}

.section-slide {
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    touch-action: pan-y;
    box-sizing: border-box;
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.sections-container.dragging * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.section-title {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(59, 130, 246, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #3b82f6;
    white-space: nowrap;
    z-index: 10;
}

/* Navigation Dots */
.nav-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    position: relative;
}
.nav-dots::before {
content: '';
position: absolute;
width: 100px;
height: 40px;
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(10px);
border-radius: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
z-index: 0;
}
.nav-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #cbd5e1;
cursor: pointer;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
z-index: 1;
border: none;
padding: 0;
margin: 0;
flex-shrink: 0;
}
.nav-dot:hover {
background: #94a3b8;
transform: scale(1.2);
}
.nav-dot.active {
width: 32px;
border-radius: 12px;
background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.nav-dot:active {
transform: scale(0.9);
}
.nav-dot:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
.nav-dot:focus:not(:focus-visible) {
outline: none;
}

/* Video Grid Mini */
.videos-mini-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
margin-top: 16px;
width: 100%;
}
.video-mini-card {
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
cursor: pointer;
transition: transform 0.2s;
}
.video-mini-card:hover {
transform: translateY(-2px);
}
.video-mini-thumb {
position: relative;
width: 100%;
padding-bottom: 56.25%;
background: #000;
}
.video-mini-thumb img {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
}
.video-mini-play {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 40px;
height: 40px;
background: rgba(255, 255, 255, 0.9);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
}
.video-mini-info {
padding: 10px;
}
.video-mini-title {
font-size: 13px;
font-weight: 600;
color: #1f2937;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.tips-section {
background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
padding: 20px;
border-radius: 12px;
margin-top: 20px;
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.tips-section h3 {
color: #92400e;
margin-bottom: 12px;
}
.tips-section ul {
list-style: none;
padding: 0;
}
.tips-section li {
color: #78350f;
padding: 8px 0;
word-wrap: break-word;
overflow-wrap: break-word;
}
/* Mobile optimizations */
@media (max-width: 640px) {
.container {
padding: 8px;
width: 100%;
max-width: 100vw;
}
.header-bar {
    margin-bottom: 12px;
    width: 100%;
}

.user-info {
    font-size: 13px;
    max-width: 55%;
    flex-shrink: 1;
}

.user-info strong {
    display: inline;
}

.btn-secondary,
.btn-logout {
    padding: 6px 10px;
    font-size: 12px;
}

.main-card {
    padding: 12px;
    margin-bottom: 12px;
}

.card-header {
    margin-bottom: 20px;
}

.card-header h1 {
    font-size: 22px;
}

.card-header p {
    font-size: 13px;
}

.stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.stat-card {
    padding: 16px;
}

.stat-icon {
    font-size: 28px;
}

.stat-number {
    font-size: 24px;
}

.stat-label {
    font-size: 13px;
}

.btn-checkin {
    padding: 14px;
    font-size: 16px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 11px;
    padding: 3px 10px;
    top: -25px;
    max-width: 85%;
}

.calendar-container {
    padding: 12px;
}

.calendar-header {
    margin-bottom: 12px;
}

.calendar-title h2 {
    font-size: 16px;
}

.btn-today {
    font-size: 11px;
}

.calendar-nav {
    font-size: 24px;
    padding: 4px 8px;
}

.calendar-grid {
    gap: 3px;
}

.day-name {
    font-size: 11px;
    padding: 4px 0;
}

.day-cell {
    font-size: 11px;
    padding: 4px;
}

.day-check {
    font-size: 8px;
}

.calendar-legend {
    gap: 12px;
    margin-top: 12px;
    font-size: 12px;
    flex-wrap: wrap;
}

.journal-prompt {
    padding: 14px;
}

.journal-prompt-text {
    font-size: 13px;
    line-height: 1.5;
}

.btn-journal {
    font-size: 13px;
    padding: 10px 16px;
}

.videos-mini-grid {
    grid-template-columns: 1fr;
}

.video-mini-title {
    font-size: 12px;
}

.modal-content {
    margin: 5% auto;
    width: 92%;
    max-width: 92vw;
    padding: 16px;
}

.modal-content h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.mood-selector {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.mood-option {
    padding: 12px 6px;
}

.mood-emoji {
    font-size: 28px;
}

.mood-label {
    font-size: 10px;
}

.reminder-card, 
.tips-section, 
.celebration-card {
    padding: 16px;
}

.reminder-card h3,
.tips-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.reminder-card ul, 
.tips-section ul {
    padding-left: 16px;
}

.reminder-card li, 
.tips-section li {
    font-size: 13px;
    padding: 8px 0;
}

.success-message {
    padding: 12px;
    gap: 8px;
    margin-bottom: 16px;
}

.message-icon {
    font-size: 20px;
}

.message-title,
.message-text {
    font-size: 13px;
}

.nav-dots {
    padding: 16px 0;
    gap: 10px;
}

.nav-dots::before {
    width: 90px;
    height: 36px;
}

.nav-dot {
    width: 7px;
    height: 7px;
}

.nav-dot.active {
    width: 28px;
}
}
/* Tablet */
@media (max-width: 768px) and (min-width: 641px) {
.videos-mini-grid {
grid-template-columns: repeat(2, 1fr);
}
.stats-grid {
    grid-template-columns: repeat(3, 1fr);
}
}
/* Small phones */
@media (max-width: 360px) {
.container {
padding: 6px;
}
.main-card {
    padding: 10px;
}

.user-info {
    font-size: 12px;
    max-width: 50%;
}

.btn-secondary,
.btn-logout {
    font-size: 11px;
    padding: 5px 8px;
}

.card-header h1 {
    font-size: 20px;
}

.calendar-grid {
    gap: 2px;
}

.day-cell {
    font-size: 10px;
}
}

/* ===== VIDEO PAGE STYLES ===== */

/* Video Tabs */
.video-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 2px;
}

.video-tab {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-size: 15px;
    position: relative;
    bottom: -2px;
}

.video-tab:hover {
    color: #667eea;
}

.video-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Video Filters */
.video-filters {
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    margin-bottom: 16px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Videos Full Grid */
.videos-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.video-full-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.video-full-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.video-full-thumb {
    position: relative;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.video-full-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.video-full-card:hover .video-full-thumb img {
    transform: scale(1.1);
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-full-card:hover .video-play-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.video-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.watched-badge {
    background: rgba(16, 185, 129, 0.95);
    color: white;
}

.video-save-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.video-save-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.video-save-btn.saved {
    color: #ef4444;
}

.video-full-info {
    padding: 16px;
}

.video-category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.video-full-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-full-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.video-full-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

/* Modal Save Button */
.save-video-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
}

.save-video-btn:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.save-video-btn.saved {
    color: #ef4444;
    border-color: #ef4444;
}

.video-category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #f3f4f6;
    border-radius: 16px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state h3 {
    color: #111827;
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .videos-full-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .video-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .video-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .filter-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    
    .filter-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        white-space: nowrap;
    }
}