/* ============================================
   CRAZY TEXTING - ULTRA HIGH GRAPHICS CSS
   Photoreal Phone Simulator with Glass Effects
   ============================================ */

/* CSS Variables for Easy Theming */
:root {
    /* Phone Colors */
    --phone-frame: linear-gradient(145deg, #2a2a2e 0%, #1a1a1d 50%, #0d0d0f 100%);
    --phone-bezel: #1a1a1d;
    --phone-screen-bg: #000000;
    
    /* UI Colors */
    --primary-blue: #007AFF;
    --primary-green: #34C759;
    --primary-red: #FF3B30;
    --primary-orange: #FF9500;
    --primary-purple: #AF52DE;
    --primary-pink: #FF2D55;
    
    /* Message Colors */
    --message-sent: linear-gradient(135deg, #007AFF 0%, #0055D4 100%);
    --message-received: linear-gradient(135deg, #3a3a3c 0%, #2c2c2e 100%);
    
    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    
    /* Animations */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0f;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 70%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.4) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(175, 82, 222, 0.4) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(52, 199, 89, 0.3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.05); }
    50% { transform: translate(-30px, 50px) scale(0.95); }
    75% { transform: translate(-50px, -20px) scale(1.02); }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particle-float 15s linear infinite;
}

@keyframes particle-float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.main-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ============================================
   PHONE DEVICE - PHOTOREAL DESIGN
   ============================================ */
.phone-container {
    position: relative;
    perspective: 1000px;
}

.phone-frame {
    position: relative;
    transform: rotateX(2deg);
    transition: transform 0.5s ease;
}

.phone-frame:hover {
    transform: rotateX(0deg) scale(1.02);
}

.phone-bezel {
    position: relative;
    width: 380px;
    height: 780px;
    background: var(--phone-frame);
    border-radius: 55px;
    padding: 12px;
    box-shadow: 
        /* Outer glow */
        0 0 60px rgba(0, 122, 255, 0.15),
        /* Main shadow */
        0 50px 100px rgba(0, 0, 0, 0.5),
        0 30px 60px rgba(0, 0, 0, 0.4),
        /* Inner highlights */
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 0 -1px 1px rgba(0, 0, 0, 0.3),
        /* Edge definition */
        0 0 0 1px rgba(255, 255, 255, 0.05);
    
    /* Metallic texture */
    background-image: 
        var(--phone-frame),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(255, 255, 255, 0.02) 1px,
            rgba(255, 255, 255, 0.02) 2px
        );
}

/* Side Buttons */
.side-button {
    position: absolute;
    background: linear-gradient(180deg, #3a3a3c 0%, #1a1a1d 100%);
    border-radius: 2px;
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-up {
    left: -3px;
    top: 150px;
    width: 3px;
    height: 35px;
}

.volume-down {
    left: -3px;
    top: 195px;
    width: 3px;
    height: 35px;
}

.power-button {
    right: -3px;
    top: 180px;
    width: 3px;
    height: 80px;
}

.silent-switch {
    left: -3px;
    top: 100px;
    width: 3px;
    height: 25px;
}

/* Phone Screen */
.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--phone-screen-bg);
    border-radius: 45px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 125px;
    height: 35px;
    background: #000000;
    border-radius: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 
        inset 0 0 10px rgba(0, 0, 0, 0.5),
        0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dynamic-island:hover {
    width: 140px;
    height: 38px;
}

.island-camera {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #1a3a5c 0%, #0a1520 100%);
    border-radius: 50%;
    box-shadow: 
        inset 0 0 3px rgba(0, 100, 200, 0.5),
        0 0 2px rgba(0, 0, 0, 0.5);
    position: relative;
}

.island-camera::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.island-speaker {
    width: 50px;
    height: 6px;
    background: linear-gradient(180deg, #1a1a1d 0%, #0a0a0d 100%);
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.island-sensors {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #1a1a2e 0%, #0a0a15 100%);
    border-radius: 50%;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 55px 28px 8px 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    z-index: 50;
}

.status-left {
    flex: 1;
}

.status-center {
    flex: 1;
}

.status-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.time {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.3px;
}

.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 1.5px;
    height: 12px;
}

.signal-bars .bar {
    width: 3px;
    background: var(--text-primary);
    border-radius: 1px;
}

.signal-bars .bar:nth-child(1) { height: 4px; }
.signal-bars .bar:nth-child(2) { height: 6px; }
.signal-bars .bar:nth-child(3) { height: 8px; }
.signal-bars .bar:nth-child(4) { height: 10px; }

.carrier {
    font-size: 12px;
    font-weight: 600;
}

.wifi-icon {
    width: 16px;
    height: 16px;
}

.wifi-icon svg {
    width: 100%;
    height: 100%;
}

.battery-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.battery-icon {
    width: 25px;
    height: 12px;
    border: 1.5px solid var(--text-primary);
    border-radius: 3px;
    padding: 1.5px;
    position: relative;
}

.battery-icon::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 5px;
    background: var(--text-primary);
    border-radius: 0 1px 1px 0;
}

.battery-level {
    width: 100%;
    height: 100%;
    background: var(--primary-green);
    border-radius: 1px;
}

.battery-percent {
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   APP CONTENT AREA
   ============================================ */
.app-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #1c1c1e 0%, #000000 100%);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.screen.slide-out {
    transform: translateX(-30%);
    opacity: 0.5;
}

/* ============================================
   MAIN MENU SCREEN
   ============================================ */
.main-menu-screen {
    padding: 30px 20px;
    justify-content: flex-start;
    background: linear-gradient(180deg, 
        rgba(0, 122, 255, 0.1) 0%, 
        rgba(0, 0, 0, 0) 30%,
        #000000 100%
    );
}

.menu-header {
    text-align: center;
    margin-bottom: 40px;
}

.app-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-icon {
    font-size: 36px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.menu-btn {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.menu-btn:hover::before {
    opacity: 1;
}

.menu-btn:active {
    transform: scale(0.98);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0055D4 100%);
    color: white;
    box-shadow: 
        0 4px 15px rgba(0, 122, 255, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.secondary-btn {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-icon {
    font-size: 24px;
    margin-right: 15px;
}

.btn-text {
    flex: 1;
    text-align: left;
}

.btn-arrow {
    font-size: 20px;
    opacity: 0.7;
}

.btn-badge {
    background: var(--primary-red);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.menu-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: var(--glass-bg);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   NPC SELECTION SCREEN
   ============================================ */
.npc-select-screen {
    background: #000000;
}

.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.screen-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.header-spacer {
    width: 40px;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.back-btn:hover {
    background: rgba(0, 122, 255, 0.1);
}

.back-btn svg {
    width: 28px;
    height: 28px;
}

.search-container {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.5);
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(118, 118, 128, 0.24);
    border-radius: 10px;
    padding: 8px 12px;
    gap: 8px;
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.clear-search {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    color: #000;
    font-size: 14px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.clear-search.visible {
    display: flex;
}

.filter-tabs {
    display: flex;
    padding: 10px 15px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    background: rgba(118, 118, 128, 0.24);
    border: none;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.filter-tab.active {
    background: var(--primary-blue);
    color: white;
}

.filter-tab:hover:not(.active) {
    background: rgba(118, 118, 128, 0.4);
}

.npc-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.npc-list::-webkit-scrollbar {
    width: 4px;
}

.npc-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.npc-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.npc-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.npc-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.npc-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-right: 12px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.npc-avatar.female {
    background: linear-gradient(135deg, #FF2D55 0%, #FF6B8A 100%);
}

.npc-avatar.male {
    background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
}

.npc-avatar.neutral {
    background: linear-gradient(135deg, #AF52DE 0%, #DA8FFF 100%);
}

.npc-online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--primary-green);
    border: 2px solid #000;
    border-radius: 50%;
}

.npc-info {
    flex: 1;
    min-width: 0;
}

.npc-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.npc-tag {
    font-size: 13px;
    color: var(--text-tertiary);
    text-transform: capitalize;
}

.npc-favorite {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.npc-favorite.active {
    color: #FFD60A;
}

.npc-favorite svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   CHAT SCREEN
   ============================================ */
.chat-screen {
    background: #000000;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 5px;
}

.chat-contact-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-right: 10px;
    background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
}

.contact-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.contact-name {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-status {
    font-size: 12px;
    color: var(--primary-green);
}

.chat-actions {
    display: flex;
    gap: 5px;
}

.action-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background: rgba(0, 122, 255, 0.1);
}

.action-btn svg {
    width: 22px;
    height: 22px;
}

.action-btn.favorite-btn.active {
    color: #FFD60A;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.4;
    animation: messageIn 0.3s ease;
    position: relative;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.sent {
    align-self: flex-end;
    background: var(--message-sent);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background: var(--message-received);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    text-align: right;
}

.message.received .message-time {
    text-align: left;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    padding: 0 15px 10px;
    gap: 8px;
}

.typing-indicator.visible {
    display: flex;
}

.typing-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
}

.typing-bubble {
    background: var(--message-received);
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Chat Input */
.chat-input-container {
    padding: 8px 10px 25px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-action-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.input-action-btn:hover {
    background: rgba(0, 122, 255, 0.1);
}

.input-action-btn svg {
    width: 24px;
    height: 24px;
}

.input-field-container {
    flex: 1;
    background: rgba(118, 118, 128, 0.24);
    border-radius: 20px;
    padding: 8px 15px;
}

.input-field-container input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
}

.input-field-container input::placeholder {
    color: var(--text-tertiary);
}

.send-btn {
    width: 36px;
    height: 36px;
    background: var(--primary-blue);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
    opacity: 0.5;
}

.send-btn.active {
    opacity: 1;
}

.send-btn:hover.active {
    background: #0066CC;
    transform: scale(1.05);
}

.send-btn svg {
    width: 18px;
    height: 18px;
    transform: translateX(2px);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 200;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 320px;
    background: linear-gradient(180deg, #2c2c2e 0%, #1c1c1e 100%);
    border-radius: 20px;
    padding: 20px;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.close-modal {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.contact-profile {
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    color: white;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.4);
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 122, 255, 0.2);
    color: var(--primary-blue);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    margin-bottom: 15px;
}

.profile-bio {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profile-stat .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: inherit;
}

.profile-stat .stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 59, 48, 0.2);
    border: none;
    border-radius: 12px;
    color: var(--primary-red);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-action-btn:hover {
    background: rgba(255, 59, 48, 0.3);
}

.profile-action-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   HOME INDICATOR
   ============================================ */
.home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 134px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* ============================================
   GLASS EFFECTS & REFLECTIONS
   ============================================ */
.screen-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.05) 100%
    );
    pointer-events: none;
    border-radius: 45px;
    z-index: 300;
}

.screen-glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 50%
    );
    pointer-events: none;
    z-index: 301;
    animation: glareMove 10s ease-in-out infinite;
}

@keyframes glareMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

/* ============================================
   PHONE SHADOW
   ============================================ */
.phone-shadow {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 40px;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.4) 0%,
        transparent 70%
    );
    filter: blur(20px);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-height: 900px) {
    .phone-bezel {
        width: 340px;
        height: 700px;
        border-radius: 50px;
    }
    
    .phone-screen {
        border-radius: 40px;
    }
    
    .dynamic-island {
        width: 110px;
        height: 32px;
    }
    
    .screen-reflection,
    .home-indicator {
        border-radius: 40px;
    }
}

@media (max-width: 450px) {
    .phone-bezel {
        width: 100%;
        max-width: 380px;
        height: 85vh;
        max-height: 780px;
        border-radius: 45px;
    }
    
    .main-container {
        padding: 10px;
    }
}

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   AVATAR LETTER STYLING
   ============================================ */
.avatar-letter {
    text-transform: uppercase;
    user-select: none;
}

/* Date Separator */
.date-separator {
    text-align: center;
    padding: 10px 0;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 500;
}

/* Read Receipt */
.read-receipt {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: right;
    padding-right: 5px;
    margin-top: -5px;
}

.read-receipt.delivered::before {
    content: '✓ ';
}

.read-receipt.read::before {
    content: '✓✓ ';
    color: var(--primary-blue);
}

/* ============================================
   PLAYER INFO & NAME MODAL
   ============================================ */
.player-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.player-name {
    color: var(--primary-blue);
    font-weight: 600;
}

.change-name-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background var(--transition-fast);
}

.change-name-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Name Input Modal */
.name-modal {
    text-align: center;
    padding: 30px 20px;
}

.name-modal .modal-header h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.name-modal .modal-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.name-modal .modal-body {
    margin-bottom: 20px;
}

.name-modal input {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-align: center;
    outline: none;
    transition: border-color var(--transition-fast);
}

.name-modal input:focus {
    border-color: var(--primary-blue);
}

.name-modal input::placeholder {
    color: var(--text-tertiary);
}

.name-modal .modal-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.name-modal .modal-btn.primary {
    background: var(--primary-blue);
    color: white;
}

.name-modal .modal-btn.primary:hover {
    background: #0056b3;
    transform: scale(1.02);
}

/* NPC Mood Indicator */
.npc-mood-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 12px;
    background: var(--bg-secondary);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

/* Enhanced Profile Stats */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.profile-stats .stat {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.profile-stats .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.profile-stats .stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ============================================
   WELCOME SCREEN
   ============================================ */
.welcome-screen {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.welcome-container {
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.welcome-header {
    margin-bottom: 30px;
}

.welcome-icon {
    font-size: 60px;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.welcome-form {
    margin-bottom: 25px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-align: left;
}

.name-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 500;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.name-input:focus {
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
}

.name-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

.input-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
    margin-bottom: 0;
}

.start-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.start-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.start-btn .btn-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.start-btn:hover:not(:disabled) .btn-arrow {
    transform: translateX(5px);
}

.welcome-features {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.feature-icon {
    font-size: 18px;
}
