/* ==========================================================================
   VERSION 7.0 - APPLE-LIKE AESTHETIC with HOME HERO
   ========================================================================== */

:root {
    --app-bg: #f5f5f7;
    /* Lighter, more Apple-like gray */
    --header-bg: rgba(255, 255, 255, 0.85);
    /* More opaque */
    --header-blur: 20px;

    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);

    --text-main: #1d1d1f;
    --text-scnd: #86868b;

    --accent-color: #0071e3;
    --accent-glow: rgba(0, 113, 227, 0.2);

    --btn-bg: #1d1d1f;
    --btn-text: #fff;

    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --trans-speed: 0.3s;

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--app-bg);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    padding-bottom: 80px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   HEADER with FILTER NAV
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    /* Reduced height for elegance */
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(var(--header-blur));
    -webkit-backdrop-filter: blur(var(--header-blur));
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-inner {
    width: 100%;
    max-width: 1000px;
    /* Tighter width */
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area .logo-icon {
    width: 32px;
    /* Smaller, subtler */
    height: auto;
    opacity: 0.9;
}

/* Filter Nav - Segmented Control Style */
.filter-nav {
    display: flex;
    background: rgba(118, 118, 128, 0.12);
    padding: 2px;
    border-radius: 9px;
    /* Apple Segmented Control Radius */
    gap: 0;
}

.filter-btn {
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    padding: 6px 16px;
    /* Compact padding */
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
}

.filter-btn.active {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.filter-btn:hover:not(.active) {
    opacity: 0.6;
}


.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
}

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

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.app-container {
    margin-top: 84px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    min-height: 80vh;
}

.section-block {
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease;
}

/* Tab Content Visibility */
.tab-content {
    display: block;
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-content.hidden {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

/* ==========================================================================
   HOME HERO (APPLE STYLE)
   ========================================================================== */
.home-hero-container {
    text-align: center;
    padding: 60px 20px 40px;
    margin-bottom: 20px;
    animation: fadeIn 0.8s ease;
}

.home-hero-container.hidden {
    display: none;
}

.hero-text {
    margin-bottom: 50px;
}

.hero-date {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    color: #86868b;
    display: block;
    margin-bottom: 4px;
}

.hero-text h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1d1d1f;
    line-height: 1.05;
}

.hero-avatars {
    display: flex;
    justify-content: center;
    gap: 60px;
    /* Ample spacing between floaters */
}

.avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-card:hover {
    transform: scale(1.08) translateY(-5px);
}

/* Round "iOS Icon" style for avatars, or just clean round? User said "Apple floating icons" */
/* Let's go with large circles with subtle shadow, very premium. */
.avatar-img-wrapper {
    width: 140px;
    /* Large */
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* Deep shadow */
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.avatar-card:hover .avatar-img-wrapper {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.avatar-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-label {
    font-size: 17px;
    font-weight: 500;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}


/* ==========================================================================
   PROJECT HEROES & LISTS
   ========================================================================== */
.project-header-hero {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
}

.large-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 4px solid #fff;
}

.project-header-hero h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.project-header-hero p {
    color: var(--text-scnd);
    font-size: 15px;
}

.approval-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

/* Approval Card Style */
.approval-card {
    background: #fff;
    /* Pure white for contrast */
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s;
}

@media(min-width: 600px) {
    .approval-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.approval-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ac-meta h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ac-meta span {
    font-size: 14px;
    color: var(--text-scnd);
    display: block;
}

.ac-actions {
    display: flex;
    gap: 12px;
}

.btn-read-script {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    border: none;
    padding: 8px 16px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-read-script:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   RECORDING SECTION (Check-up + Grid)
   ========================================================================== */

/* Checkup Widget */
.checkup-widget {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.checkup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.checkup-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.date-display {
    font-size: 13px;
    color: var(--text-scnd);
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
}

.progress-section {
    margin-bottom: 16px;
}

.progress-info {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-scnd);
    font-weight: 500;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--text-main);
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-reset {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    background: transparent;
    color: var(--text-scnd);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-main);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Cards Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media(min-width: 650px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.content-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.content-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* Card Header: Tag + Checkbox */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: #000;
    padding: 4px 8px;
    border-radius: 8px;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.check-recorded {
    appearance: none;
    width: 28px;
    height: 28px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: #fff;
}

.check-recorded:checked {
    background-color: #34c759;
    border-color: #34c759;
}

.check-recorded:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

/* Card Info */
.card-info h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #1d1d1f;
}

.card-info p {
    font-size: 14px;
    color: var(--text-scnd);
    margin-bottom: 20px;
    line-height: 1.4;
}

.btn-open-script {
    margin-top: auto;
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    border: none;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-open-script:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Card Completed Visual State */
.content-card.completed {
    opacity: 0.5;
    filter: grayscale(1);
}

.content-card.completed:hover {
    opacity: 0.8;
    filter: grayscale(0);
}

/* ==========================================================================
   DRAWER & MODAL
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.script-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 90%;
    max-width: 600px;
    background: #fff;
    z-index: 2001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.script-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    padding: 24px;
    /* More breathing room */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.drawer-header-content {
    padding-right: 20px;
}

.drawer-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.drawer-header p {
    color: var(--text-scnd);
    font-size: 14px;
}

.btn-close-drawer {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-close-drawer:hover {
    background: rgba(0, 0, 0, 0.1);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px 32px;
    /* Lots of whitespace */
    line-height: 1.8;
    font-size: 17px;
    color: #1d1d1f;
}

.script-text-container h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.script-text-container p {
    margin-bottom: 24px;
}

.script-text-container ul,
.script-text-container ol {
    padding-left: 24px;
    margin-bottom: 24px;
}

.script-text-container li {
    margin-bottom: 12px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    text-align: center;
    padding: 40px;
    color: var(--text-scnd);
    font-size: 12px;
    margin-top: 40px;
}

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

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