/* Global styles */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(1.02); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f8;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: 
        radial-gradient(circle at center, rgba(224,224,224,0.3) 1px, transparent 1px),
        linear-gradient(45deg, #f5f5f5, #ffffff);
    background-size: 32px 32px, 100% 100%;
}

/* Intro page styles */
.intro-page {
    background-color: #fff;
    color: #000;
    overflow: hidden;
}

.intro-content {
    text-align: center;
    padding: 2rem;
    animation: fadeIn 1s ease-out;
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.intro-content.fade-out {
    animation: fadeOut 1s ease-out forwards;
}

.intro-content h1 {
    font-size: 3.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

/* Lock screen styles */
.lock-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #FF7B54 0%, #2B4865 100%), radial-gradient(circle at top right, rgba(255,255,255,0.2) 0%, transparent 60%);
    background-blend-mode: soft-light;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    z-index: 1000;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50px;
}

.lock-screen.swiped {
    transform: translateY(-100%);
}

.status-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.2px;
}

.status-time {
    font-size: 0.95rem;
    font-weight: 600;
}

.time {
    font-size: 7rem;
    font-weight: 200;
    margin-top: 6rem;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    letter-spacing: -3px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.date {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
    font-weight: 400;
}

.icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.wifi-icon {
    opacity: 0.95;
    width: 16px;
    height: 16px;
}

.battery-icon {
    opacity: 0.95;
    width: 24px;
    height: 12px;
    margin-left: 0.25rem;
}

.swipe-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.swipe-text {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.swipe-line {
    width: 35px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    animation: swipeHint 1.5s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50% { transform: translateY(-10px); opacity: 0.4; }
}

.content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

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

/* Sleep tracking page styles */
.sleep-page {
    background: transparent;
}

.sleep-card {
    background: #fff;
    border-radius: 50px;
    padding: 0;
    width: 430px;
    height: 932px;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease-out;
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, box-shadow;
}

.sleep-card:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
}

.lock-screen {
    padding: 1.5rem;
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #1d1d1f;
    padding: 0.5rem 0;
    gap: 1rem;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #F5F5F7;
    color: #1d1d1f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.icon-btn:hover {
    background: #E5E5EA;
    transform: translateY(-1px);
}

.icon-btn:active {
    transform: translateY(1px);
}

.copy-btn {
    font-weight: 600;
    font-size: 12px;
}

/* Dark mode styles */
.sleep-card {
    transition: background-color 0.3s ease;
}

.dark-mode .sleep-card {
    background-color: #1c1c1e;
}

.dark-mode h2,
.dark-mode .title,
.dark-mode .feedback h3,
.dark-mode .hours {
    color: #ffffff;
}

.dark-mode .page-count,
.dark-mode .feedback p,
.dark-mode .quality {
    color: #98989f;
}

.dark-mode .option {
    background: #2c2c2e;
}

.dark-mode .option.selected {
    background: #0A84FF20;
}

.dark-mode .icon-btn {
    background: #2c2c2e;
    color: #ffffff;
}

.dark-mode .icon-btn:hover {
    background: #3a3a3c;
}

.back-btn {
    text-decoration: none;
    color: #007AFF;
    font-size: 1.5rem;
    margin-right: 1rem;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.back-btn:hover {
    opacity: 1;
}

.title {
    flex-grow: 1;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1d1d1f;
}

.page-count {
    color: #86868b;
    font-size: 0.95rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 2rem;
    line-height: 1.3;
    text-align: center;
    padding: 0 1rem;
}

.feedback {
    text-align: center;
    margin-bottom: 2rem;
}

@keyframes pulseAura {
    0% { filter: drop-shadow(0 0 15px rgba(255, 204, 0, 0.4)); }
    50% { filter: drop-shadow(0 0 25px rgba(255, 204, 0, 0.6)); }
    100% { filter: drop-shadow(0 0 15px rgba(255, 204, 0, 0.4)); }
}

.emoji-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    position: relative;
}

.emoji-large::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    z-index: 1;
}

.current-mood {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    animation: pulseAura 2s ease-in-out infinite;
}

.feedback h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.feedback p {
    color: #86868b;
    font-size: 0.95rem;
}

.options {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 70px;
    background: #F5F5F7;
}

.option:hover {
    transform: translateY(-2px);
}

.option:active {
    transform: translateY(1px);
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.option::after {
    content: '✓';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 24px;
    height: 24px;
    background: #007AFF;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: transform 0.2s ease;
}

@keyframes selectedAura {
    0% { box-shadow: 0 0 15px rgba(0, 122, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 122, 255, 0.3); }
    100% { box-shadow: 0 0 15px rgba(0, 122, 255, 0.2); }
}

.option.selected {
    background: #F2F8FF;
}

.option.selected::before {
    border-color: #007AFF;
    animation: selectedAura 2s ease-in-out infinite;
}

.option.selected::after {
    transform: translateX(-50%) scale(1);
}

.option.selected .text {
    opacity: 1;
    transform: translateY(0);
}

.option input[type="radio"] {
    display: none;
}

.emoji {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: all 0.2s ease;
    margin-bottom: 0.3rem;
}

.text {
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
}

.option:not(.selected) .text {
    opacity: 0.7;
    transform: translateY(-2px);
}

.option:hover .text {
    opacity: 1;
    transform: translateY(0);
}

.hours {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    padding: 0 0.2rem;
}

.quality {
    color: #86868b;
    font-size: 0.75rem;
    white-space: nowrap;
    padding: 0 0.2rem;
}

.continue-btn {
    width: 100%;
    padding: 0.9rem;
    background-color: #007AFF;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
    margin-bottom: 1rem;
}

.continue-btn:disabled {
    background-color: #007AFF;
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.continue-btn:hover {
    background-color: #0066DA;
}

.continue-btn:active {
    transform: scale(0.98);
}

.home-indicator {
    width: 135px;
    height: 5px;
    background-color: #000;
    border-radius: 100px;
    margin: 0 auto;
    opacity: 0.3;
}

/* Slider styles */
.slider-container {
    width: 100%;
    padding: 2rem 1rem;
    position: relative;
}

.slider-track {
    width: 100%;
    height: 4px;
    background: #E5E5EA;
    border-radius: 2px;
    position: relative;
}

.slider-points {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.slider-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    position: relative;
}

.slider-point::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #E5E5EA;
    border-radius: 50%;
    position: absolute;
    top: -38px;
    transition: all 0.2s ease;
}

.slider-point.active::before {
    background: #007AFF;
    transform: scale(1.2);
}

.slider-point .emoji {
    width: 32px;
    height: 32px;
    margin-bottom: 0.2rem;
}

.slider-point .text {
    font-size: 0.85rem;
    color: #86868b;
    white-space: nowrap;
}

.slider-handle {
    width: 24px;
    height: 24px;
    background: #007AFF;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.4);
    transition: transform 0.2s ease;
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.slider-progress {
    position: absolute;
    height: 100%;
    background: #007AFF;
    border-radius: 2px;
    pointer-events: none;
}

/* Activity styles */
.activity-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
    margin-bottom: 2rem;
}

@keyframes selectActivity {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.activity-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: #F5F5F7;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.activity-option:hover {
    background: #E5E5EA;
    transform: translateX(8px);
}

.activity-option.selected {
    background: #F2F8FF;
    border: 2px solid #007AFF;
    animation: selectActivity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(8px);
}

.activity-option:not(.selected):hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.activity-option .emoji {
    width: 32px;
    height: 32px;
}

.activity-option .text {
    font-weight: 500;
    color: #1d1d1f;
}

/* Home page styles */
.home-page {
    background: linear-gradient(160deg, #FF7B54 0%, #2B4865 100%);
    min-height: 100vh;
}

.home-card {
    background: #fff;
    border-radius: 50px;
    width: 430px;
    height: 932px;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease-out;
    margin: 2rem auto;
}

.section-nav {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-item {
    color: #86868b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-item:hover {
    color: #1d1d1f;
    background: rgba(0, 0, 0, 0.05);
}

.nav-item.active {
    color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
}

.sections-container {
    height: calc(100% - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y proximity;
    position: relative;
    will-change: transform;
}

.sections-container::-webkit-scrollbar {
    display: none;
}

.sections-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.section {
    min-height: 100%;
    scroll-snap-align: start;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem 1.5rem;
    position: relative;
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    display: flex;
    align-items: center;
}

.section.active {
    opacity: 1;
    transform: translateY(0);
}

.section-content {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FF7B54 0%, #2B4865 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #86868b;
}

/* Feature cards */
.features {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: #f5f5f7;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #86868b;
    font-size: 0.9rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e5ea;
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #e5e5ea;
    transform: translateX(-50%);
}

.timeline-marker.completed {
    background: #34C759;
}

.timeline-marker.active {
    background: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2);
}

.timeline-content h3 {
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: #86868b;
}

/* Tokenomics */
.tokenomics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem 0;
}

.token-card {
    background: #f5f5f7;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
}

.token-card h3 {
    font-size: 1rem;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.token-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #007AFF;
    margin-bottom: 0.5rem;
}

.token-description {
    font-size: 0.9rem;
    color: #86868b;
}

.twitter-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #007AFF;
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    margin: 2rem auto 0;
    width: fit-content;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.twitter-link:hover {
    background: #0066DA;
    transform: translateY(-2px);
}

.twitter-link:active {
    transform: translateY(1px);
}

.twitter-link svg {
    width: 18px;
    height: 18px;
}

.dark-mode .twitter-link {
    background: #0A84FF;
}

.dark-mode .twitter-link:hover {
    background: #0066DA;
}

/* Dark mode styles for home page */
.dark-mode .home-card {
    background: #1c1c1e;
}

.dark-mode .section-nav {
    background: rgba(28, 28, 30, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .nav-item {
    color: #98989f;
}

.dark-mode .nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.dark-mode .feature-card,
.dark-mode .token-card {
    background: #2c2c2e;
}

.dark-mode .feature-card h3,
.dark-mode .token-card h3,
.dark-mode .timeline-content h3 {
    color: #ffffff;
}

.dark-mode .feature-card p,
.dark-mode .token-description,
.dark-mode .timeline-content p,
.dark-mode .subtitle {
    color: #98989f;
}

/* Responsive design */
@media (max-width: 480px) {
    .sleep-card {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .intro-content h1 {
        font-size: 2.8rem;
    }
}
