/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

/* Mobile-specific body styles */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 100vh;
        height: auto;
    }
    
    .screen {
        position: relative;
        min-height: 100vh;
        height: auto;
        padding: 0;
        overflow-y: auto;
    }
}

/* Screen Transitions */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    opacity: 1;
}

#conversationScreen {
    display: none;
}

/* Voice Selection Screen */
.selection-container {
    text-align: center;
    max-width: 1200px;
    padding: 40px 20px;
    width: 100%;
}

/* Mobile header - hidden on desktop */
.mobile-header {
    display: none;
}

.logo-top {
    height: 80px;
    width: auto;
    max-width: 250px;
    margin-bottom: 30px;
    opacity: 0.9;
    object-fit: contain;
}

.title {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 10px;
    background: linear-gradient(to right, #00BED2, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 18px;
    color: #888;
    margin-bottom: 50px;
}

/* Voice Cards */
/* =================================================
   MOBILE-FIRST BASE STYLES (320px+)
   ================================================= */

.voice-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding: 0 16px;
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.voice-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 20px 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    position: relative;
}

.voice-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 190, 210, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 190, 210, 0.15);
}

.voice-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.voice-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.voice-card:hover .voice-avatar::before {
    transform: rotate(45deg) translateY(200%);
}

.voice-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.voice-card p {
    color: #888;
    font-size: 11px;
    margin: 0;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.voice-card .select-voice-btn {
    flex-shrink: 0;
    margin-top: auto;
    min-height: 44px;
    max-height: 44px;
}

/* Remove select voice button styles - no longer needed */
.select-voice-btn {
    display: none;
}

/* Remove button hover styles - no longer needed */

/* Conversation Screen */
.conversation-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.top-bar {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo-small {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-small:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.current-voice {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.current-voice span {
    font-weight: 500;
}

.change-voice-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #888;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-voice-btn:hover {
    border-color: #00BED2;
    color: #00BED2;
}

/* Animated Orb */
.orb-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 60px;
}

.orb {
    width: 200px;
    height: 200px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orb-inner {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #00f2fe, #00BED2);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 190, 210, 0.5);
}

.orb-outer {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    border: 2px solid rgba(0, 190, 210, 0.3);
    opacity: 0;
}

/* Orb States */
.orb.listening .orb-inner {
    animation: orbPulse 2s ease-in-out infinite;
}

.orb.listening .orb-outer {
    animation: orbRipple 2s ease-out infinite;
}

.orb.speaking .orb-inner {
    animation: orbSpeak 0.8s ease-in-out infinite;
}

.orb.speaking .orb-outer {
    animation: orbSpeakRipple 1.2s ease-out infinite;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes orbRipple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes orbSpeak {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    25% { 
        transform: scale(1.15);
        filter: brightness(1.2);
    }
    75% { 
        transform: scale(0.95);
        filter: brightness(0.9);
    }
}

@keyframes orbSpeakRipple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.status-text {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    color: #888;
    white-space: nowrap;
}

/* Talk Button */
.talk-button {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 20px 40px;
    border-radius: 60px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.talk-button:hover {
    background: rgba(0, 190, 210, 0.2);
    border-color: #00BED2;
    transform: scale(1.05);
}

.talk-button:active {
    transform: scale(0.98);
}

.talk-button.active {
    background: rgba(0, 190, 210, 0.3);
    border-color: #00BED2;
    animation: buttonPulse 2s ease-in-out infinite;
}

.talk-button svg {
    width: 24px;
    height: 24px;
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 190, 210, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(0, 190, 210, 0); }
}

/* Large Desktop - 3 columns */
@media (min-width: 1200px) {
    .voice-cards {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        gap: 36px;
    }
}

/* Medium Desktop - 3 columns */
@media (min-width: 900px) and (max-width: 1199px) {
    .voice-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }
    
    .voice-card {
        max-width: 320px;
    }
}

/* Small Desktop/Large Tablet - 2 columns */
@media (min-width: 769px) and (max-width: 899px) {
    .selection-container {
        padding: 30px 20px;
    }
    
    .voice-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        max-width: 700px;
    }
    
    .voice-card {
        max-width: 320px;
    }
}

/* Tablet Portrait - 1 column */
@media (min-width: 481px) and (max-width: 768px) {
    .selection-container {
        padding: 30px 20px;
        max-width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }
    
    .logo-top {
        height: 60px;
        margin-bottom: 30px;
        flex-shrink: 0;
    }
    
    .title {
        font-size: 28px;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .subtitle {
        font-size: 16px;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .voice-cards {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 0;
        max-width: 450px;
        width: 100%;
    }
    
    .voice-card {
        padding: 28px 24px;
        max-width: 100%;
        height: 200px;
    }
    
    .voice-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .voice-card h3 {
        font-size: 20px;
    }
    
    .voice-card p {
        font-size: 14px;
    }
    
    .orb-container {
        width: 250px;
        height: 250px;
        margin-bottom: 40px;
    }
    
    .orb {
        width: 150px;
        height: 150px;
    }
    
    .top-bar {
        padding: 0 20px;
        top: 20px;
    }
    
    .logo-small {
        height: 45px;
    }
    
    .current-voice {
        padding: 8px 16px;
        gap: 12px;
    }
    
    .current-voice span {
        font-size: 14px;
    }
    
    .change-voice-btn {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .talk-button {
        padding: 16px 32px;
        font-size: 16px;
    }
}

/* =================================================\n   RESPONSIVE BREAKPOINTS SUMMARY:\n   - Mobile (320-480px): Single column, 110px height\n   - Large Mobile (481-767px): Single column, 120px height\n   - Tablet (768-1023px): 2-column grid, 130px height\n   - Desktop (1024-1439px): 3-column grid, 200px height\n   - Ultra-wide (1440px+): 3-column grid, 220px height\n   ================================================= */
/* =================================================\n   LARGE MOBILE (481px - 767px)\n   ================================================= */
@media (min-width: 481px) and (max-width: 767px) {
    .voice-cards {
        gap: 16px;
        margin-top: 24px;
        padding: 0 20px;
        max-width: 450px;
    }
    
    .voice-card {
        padding: 24px 20px;
        height: 120px;
        gap: 10px;
    }
    
    .voice-avatar {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .voice-card h3 {
        font-size: 16px;
    }
    
    .voice-card p {
        font-size: 12px;
    }
}

/* =================================================\n   TABLET (768px - 1023px)\n   ================================================= */
@media (min-width: 768px) {
    .voice-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        margin-top: 32px;
        padding: 0 24px;
        max-width: 600px;
    }
    
    .voice-card {
        padding: 24px 20px;
        height: 130px;
        gap: 10px;
    }
    
    .voice-avatar {
        width: 54px;
        height: 54px;
        font-size: 24px;
    }
    
    .voice-card h3 {
        font-size: 17px;
        margin: 0;
    }
    
    .voice-card p {
        font-size: 13px;
        margin: 0;
    }
}

/* =================================================\n   DESKTOP (1024px - 1439px)\n   ================================================= */
@media (min-width: 1024px) {
    .voice-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
        margin-top: 50px;
        padding: 0;
        max-width: 1000px;
    }
    
    .voice-card {
        padding: 40px 32px;
        height: 200px;
        max-width: none;
        gap: 16px;
    }
    
    .voice-avatar {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .voice-card h3 {
        font-size: 22px;
        margin: 0;
        font-weight: 600;
    }
    
    .voice-card p {
        font-size: 16px;
        margin: 0;
        opacity: 0.8;
    }
    
    /* Enhanced hover effects for desktop */
    .voice-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 35px rgba(0, 190, 210, 0.2);
        background: rgba(255, 255, 255, 0.15);
    }
}

/* =================================================\n   ULTRA-WIDE DESKTOP (1440px+)\n   ================================================= */
@media (min-width: 1440px) {
    .voice-cards {
        max-width: 1200px;
        gap: 40px;
        margin-top: 60px;
    }
    
    .voice-card {
        padding: 48px 40px;
        height: 220px;
    }
    
    .voice-avatar {
        width: 90px;
        height: 90px;
        font-size: 36px;
    }
    
    .voice-card h3 {
        font-size: 24px;
    }
    
    .voice-card p {
        font-size: 17px;
    }
}

/* Mobile specific styles - 480px and down */
@media (max-width: 480px) {
    #voiceSelectionScreen {
        padding: 0;
        background: #0a0a0a;
    }
    
    .selection-container {
        padding: 0;
        max-width: 100vw;
        width: 100vw;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
    }
    
    /* Show mobile header, hide desktop header elements */
    .mobile-header {
        display: block !important;
        background: rgba(255, 255, 255, 0.08);
        padding: 20px 20px 25px 20px;
        border-bottom: 2px solid rgba(0, 190, 210, 0.3);
        position: relative;
        top: 0;
        z-index: 10;
        width: 100%;
        flex-shrink: 0;
    }
    
    /* Hide desktop header elements on mobile */
    .selection-container > .logo-top,
    .selection-container > .title,
    .selection-container > .subtitle {
        display: none !important;
    }
    
    .mobile-header .logo-top {
        height: 45px;
        margin-bottom: 16px;
        max-width: 140px;
        display: block !important;
        margin-left: auto;
        margin-right: auto;
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-header .title {
        font-size: 22px;
        margin-bottom: 6px;
        text-align: center;
        line-height: 1.3;
        padding: 0 10px;
        color: #ffffff;
    }
    
    .mobile-header .subtitle {
        font-size: 13px;
        margin-bottom: 0;
        text-align: center;
        color: #aaa;
        padding: 0 15px;
        line-height: 1.4;
    }
    
    /* Mobile-specific adjustments only */
    
    .orb-container {
        width: 200px;
        height: 200px;
        margin-bottom: 30px;
    }
    
    .orb {
        width: 120px;
        height: 120px;
    }
    
    .top-bar {
        padding: 0 16px;
        top: 16px;
    }
    
    .logo-small {
        height: 40px;
    }
    
    .current-voice {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .current-voice span {
        font-size: 13px;
    }
    
    .change-voice-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .talk-button {
        padding: 14px 28px;
        font-size: 15px;
        border-radius: 50px;
    }
    
    .talk-button svg {
        width: 18px;
        height: 18px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .mobile-header {
        padding: 16px 16px 20px 16px;
    }
    
    .mobile-header .logo-top {
        height: 40px;
        margin-bottom: 14px;
    }
    
    .mobile-header .title {
        font-size: 20px;
    }
    
    .mobile-header .subtitle {
        font-size: 12px;
    }
    
    .voice-cards {
        gap: 14px;
        padding: 0 16px 30px 16px;
        max-width: 340px;
    }
    
    .voice-card {
        padding: 20px 16px;
        height: 170px;
        max-width: 320px;
    }
    
    .voice-avatar {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .voice-card h3 {
        font-size: 17px;
    }
    
    .voice-card p {
        font-size: 12px;
    }
    
    .select-voice-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Hide unnecessary elements */
#audioPlayback {
    display: none;
}

/* Background gradient animation */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 190, 210, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 242, 254, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

/* End of modern UI styles */ 