* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.iphone-container {
    width: 100%;
    max-width: 390px;
    height: 844px;
    max-height: 90vh;
    background: #000;
    border-radius: 47px;
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 0 0 3px #1a1a1a,
        0 0 0 6px #0d0d0d,
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(59, 130, 246, 0.1);
    display: flex;
    flex-direction: column;
}

/* Notch Area */
.iphone-notch {
    background: #000;
    padding: 12px 24px 8px;
    position: relative;
    z-index: 10;
}

.notch-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.notch-island {
    width: 126px;
    height: 34px;
    background: #000;
    border-radius: 20px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
}

.time {
    font-weight: 600;
    font-size: 15px;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-icons svg {
    width: 17px;
    height: 12px;
    fill: #fff;
}

.status-icons .battery {
    width: 25px;
}

/* Chat Header */
.chat-header {
    background: #1c1c1e;
    padding: 8px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    width: 60px;
}

.back-arrow {
    width: 24px;
    height: 24px;
    color: #007AFF;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.avatar-container {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.header-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-name {
    color: #fff;
    font-size: 11px;
    font-weight: 500;
}

.header-right {
    width: 60px;
    display: flex;
    justify-content: flex-end;
}

.video-icon {
    width: 28px;
    height: 28px;
    color: #007AFF;
}

/* Chat Container */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-container::-webkit-scrollbar {
    width: 0;
}

/* Date Separator */
.date-separator {
    text-align: center;
    margin: 8px 0 16px;
}

.date-separator span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

/* Messages */
.message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 85%;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.sent {
    align-self: flex-start;
    flex-direction: row;
}

.message.received {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.bubble {
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 100%;
    word-wrap: break-word;
}

.message.sent .bubble {
    background: #3a3a3c;
    color: #fff;
    border-bottom-left-radius: 4px;
}

.message.received .bubble {
    background: #007AFF;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bubble p {
    font-size: 16px;
    line-height: 1.4;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-6px);
    }
}

/* Options Container */
.options-container {
    background: #1c1c1e;
    padding: 20px 16px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.options-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-align: center;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.option-btn {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: #fff;
    border: none;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.option-btn:hover::before {
    opacity: 1;
}

.option-btn:active {
    transform: scale(0.96);
}

.option-btn:nth-child(5) {
    grid-column: span 2;
}

.option-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Reset Button */
.reset-btn {
    background: linear-gradient(135deg, #34C759 0%, #30D158 100%);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 12px;
}

.reset-btn:active {
    transform: scale(0.96);
}

/* Home Indicator */
.home-indicator {
    background: #1c1c1e;
    padding: 8px 0 20px;
    display: flex;
    justify-content: center;
}

.home-indicator::after {
    content: '';
    width: 134px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 430px) {
    body {
        padding: 0;
        background: #000;
    }
    
    .iphone-container {
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
        box-shadow: none;
    }
}

/* Response highlight */
.response-facility {
    font-weight: 700;
    font-size: 18px;
}
