/* Font Face Declaration */
@font-face {
    font-family: 'CustomFont';
    src: url('font.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* CSS Custom Properties */
:root {
    --primary-color: #5D5CDE;
    --bg-gray-900: #111827;
    --text-white: #ffffff;
    --text-white-90: rgba(255, 255, 255, 0.9);
    --bg-white-20: rgba(255, 255, 255, 0.2);
    --bg-gray-800: #1f2937;
    --border-primary: rgba(93, 92, 222, 0.5);
    --border-primary-full: rgba(93, 92, 222, 1);
    --primary-40: rgba(93, 92, 222, 0.4);
}

/* Core Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Snap Scroll Container */
.snap-container {
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-y: scroll;
    height: 100vh;
}

.snap-container::-webkit-scrollbar {
    display: none;
}

.snap-item {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    min-height: 100vh;
}

/* Quote and Background Styles */
.quote-overlay {
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.3) 100%);
}

.background-image {
    opacity: 0;
    filter: blur(0px);
    transform: scale(1.05);
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.background-image.loaded {
    opacity: 0.85;
    filter: blur(0.5px);
    transform: scale(1);
}

/* Story Quote - Enhanced for full height display */
.story-quote {
    font-family: 'CustomFont', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.625;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    
    /* Enhanced background with better readability */
    background: rgba(0, 0, 0, 0.4);
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 2rem;
    
    /* Enhanced for full content display */
    min-height: auto;
    max-height: none;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    /* Better text wrapping */
    word-wrap: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    .story-quote {
        font-size: 1.5rem;
        line-height: 2rem;
        padding: 2.5rem 3rem;
        font-size: 1.75rem;
        line-height: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .story-quote {
        font-size: 2rem;
        line-height: 2.5rem;
        padding: 3rem 4rem;
    }
}

/* Quote container enhancement for full height */
.quote-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    max-width: none;
    width: 100%;
}

/* Interactive Elements - Glassmorphism */
.floating-btn {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.floating-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.floating-btn:active {
    transform: scale(0.95);
}

/* Profile Component Styles */
.profile-circle {
    animation: pulse-border 2s infinite;
    border-color: var(--border-primary);
    background-color: var(--bg-gray-800);
    overflow: hidden;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--border-primary); }
    50% { border-color: var(--border-primary-full); }
}

.profile-image {
    opacity: 0;
    transition: opacity 0.6s ease-out;
    object-fit: cover;
    border-radius: 50%;
}

.profile-image.loaded {
    opacity: 1;
}

.profile-fallback {
    transition: opacity 0.3s ease-out;
}

.profile-fallback.hidden {
    opacity: 0;
}

.profile-info {
    color: var(--text-white-90);
    font-size: 1.125rem;
}

.verification-icon {
    width: 1rem;
    height: 1rem;
    color: var(--primary-color);
    fill: currentColor;
}

/* Transparent T Button Styles */
.t-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    /* Performance optimizations */
    will-change: transform, background-color, box-shadow;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0);
}

.t-button:hover {
    transform: translateZ(0) scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.t-button:active {
    transform: translateZ(0) scale(0.98);
    transition-duration: 0.1s;
}

/* T Popup Styles */
.t-popup {
    position: absolute;
    bottom: 60px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) translateZ(0) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
    /* Performance optimizations */
    will-change: transform, opacity, visibility;
    backface-visibility: hidden;
}

.t-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateZ(0) scale(1);
    pointer-events: all;
}

.t-popup.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) translateZ(0) scale(0.95);
    pointer-events: none;
}

/* Popup Button Styles */
.popup-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    min-width: 150px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-family: 'CustomFont', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    /* Performance optimizations */
    will-change: transform, background-color, box-shadow;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    /* Initial hidden state */
    opacity: 0;
    transform: translateX(15px) translateZ(0);
}

.popup-btn:hover {
    transform: translateX(-2px) translateZ(0);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.popup-btn:active {
    transform: translateX(-1px) translateZ(0) scale(0.98);
    transition-duration: 0.1s;
}

.popup-btn-icon {
    font-size: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-btn-label {
    white-space: nowrap;
    font-weight: 500;
}

/* Optimized animations for button reveal */
.t-popup.visible .popup-btn {
    animation: slideInRight 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.t-popup.visible .popup-btn:nth-child(1) {
    animation-delay: 0.05s;
}

.t-popup.visible .popup-btn:nth-child(2) {
    animation-delay: 0.1s;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(15px) translateZ(0);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateZ(0);
    }
}

 