/**
 * Litskill Voice Tutor Styles
 * Premium Voice-Only AI Study Companion
 */

/* Brand Color Variables - Customize with your Litskill logo colors */
:root {
    --brand-color-1: #00d2ff;
    --brand-color-2: #3a7bd5;
    --brand-color-gradient: linear-gradient(135deg, var(--brand-color-1) 0%, var(--brand-color-2) 100%);
    
    /* State Colors */
    --orb-idle-start: #00d2ff;
    --orb-idle-end: #3a7bd5;
    --orb-listening-start: #ff6b6b;
    --orb-listening-end: #ffa500;
    --orb-speaking-start: #51cf66;
    --orb-speaking-end: #40c057;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Floating Action Button (FAB) */
.voice-tutor-fab {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 70px !important;
    height: 70px !important;
    background: var(--brand-color-gradient) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    z-index: 9998 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    color: white !important;
    font-size: 28px !important;
}

.voice-tutor-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.voice-tutor-fab:active {
    transform: scale(0.95);
}

.voice-tutor-fab i {
    animation: headset-pulse 2s ease-in-out infinite;
}

@keyframes headset-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Full-Screen Overlay */
.voice-tutor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.voice-tutor-overlay.active {
    display: flex;
    opacity: 1;
}

/* Breathing Orb Container */
.voice-tutor-orb-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

/* Breathing Orb */
.voice-tutor-orb {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orb-idle-start) 0%, var(--orb-idle-end) 100%);
    box-shadow: 
        0 0 60px rgba(0, 210, 255, 0.6),
        0 0 120px rgba(58, 123, 213, 0.4),
        inset 0 0 40px rgba(255, 255, 255, 0.3);
    position: relative;
    animation: orb-breathe-idle 3s ease-in-out infinite;
    transition: all 0.5s ease;
}

/* Orb States */
.voice-tutor-orb.state-idle {
    background: linear-gradient(135deg, var(--orb-idle-start) 0%, var(--orb-idle-end) 100%);
    animation: orb-breathe-idle 3s ease-in-out infinite;
    box-shadow: 
        0 0 60px rgba(0, 210, 255, 0.6),
        0 0 120px rgba(58, 123, 213, 0.4),
        inset 0 0 40px rgba(255, 255, 255, 0.3);
}

.voice-tutor-orb.state-listening {
    background: linear-gradient(135deg, var(--orb-listening-start) 0%, var(--orb-listening-end) 100%);
    animation: orb-breathe-listening 0.8s ease-in-out infinite;
    box-shadow: 
        0 0 80px rgba(255, 107, 107, 0.8),
        0 0 140px rgba(255, 165, 0, 0.6),
        inset 0 0 50px rgba(255, 255, 255, 0.4);
}

.voice-tutor-orb.state-speaking {
    background: linear-gradient(135deg, var(--orb-speaking-start) 0%, var(--orb-speaking-end) 100%);
    animation: orb-breathe-speaking 1.2s ease-in-out infinite;
    box-shadow: 
        0 0 100px rgba(81, 207, 102, 0.9),
        0 0 160px rgba(64, 192, 87, 0.7),
        inset 0 0 60px rgba(255, 255, 255, 0.5);
}

/* Orb Animations */
@keyframes orb-breathe-idle {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes orb-breathe-listening {
    0%, 100% {
        transform: scale(1);
        opacity: 0.95;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

@keyframes orb-breathe-speaking {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* Orb Inner Glow */
.voice-tutor-orb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    pointer-events: none;
}

/* Status Text */
.voice-tutor-status {
    color: white;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
}

/* Control Buttons Container */
.voice-tutor-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
}

/* Control Buttons */
.voice-tutor-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
}

.voice-tutor-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.voice-tutor-btn:active {
    transform: scale(0.95);
}

.voice-tutor-btn-hangup {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
}

.voice-tutor-btn-hangup:hover {
    background: linear-gradient(135deg, #ff3742 0%, #ff2d3a 100%);
}

.voice-tutor-btn-mute {
    background: linear-gradient(135deg, #57606f 0%, #485563 100%);
}

.voice-tutor-btn-mute:hover {
    background: linear-gradient(135deg, #485563 0%, #3d4852 100%);
}

.voice-tutor-btn-mute.active {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
}

/* Balance Display */
.voice-tutor-balance {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Error Message */
.voice-tutor-error {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 71, 87, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px 24px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    max-width: 400px;
    text-align: center;
}

.voice-tutor-error.show {
    display: block;
    animation: error-slide-up 0.3s ease-out;
}

@keyframes error-slide-up {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .voice-tutor-fab {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
    
    .voice-tutor-orb-container {
        width: 250px;
        height: 250px;
    }
    
    .voice-tutor-orb {
        width: 160px;
        height: 160px;
    }
    
    .voice-tutor-status {
        font-size: 16px;
    }
    
    .voice-tutor-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .voice-tutor-balance {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .voice-tutor-overlay {
        padding: 15px;
    }
}

/* Hide FAB when overlay is active */
.voice-tutor-overlay.active ~ .voice-tutor-fab {
    display: none;
}

/* Pricing Grid Styles */
.voice-tutor-pricing {
    display: none;
    width: 100%;
    max-width: 900px;
    padding: 40px 20px;
    text-align: center;
}

.voice-tutor-overlay.show-pricing .voice-tutor-pricing {
    display: block;
}

.voice-tutor-overlay.show-pricing .voice-tutor-orb-container,
.voice-tutor-overlay.show-pricing .voice-tutor-controls,
.voice-tutor-overlay.show-pricing .voice-tutor-status {
    display: none !important;
}

/* Show voice interface when pricing is hidden */
.voice-tutor-overlay:not(.show-pricing) .voice-tutor-pricing {
    display: none !important;
}

.voice-tutor-overlay:not(.show-pricing) .voice-tutor-orb-container,
.voice-tutor-overlay:not(.show-pricing) .voice-tutor-controls,
.voice-tutor-overlay:not(.show-pricing) .voice-tutor-status {
    display: flex;
}

.voice-tutor-pricing-header {
    margin-bottom: 40px;
}

.voice-tutor-pricing-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
}

.voice-tutor-pricing-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', sans-serif;
}

.voice-tutor-pricing-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.voice-tutor-pricing-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.voice-tutor-pricing-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.voice-tutor-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.voice-tutor-pricing-row {
    display: contents;
}

.voice-tutor-pricing-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
}

.voice-tutor-pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-color-1), var(--brand-color-2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voice-tutor-pricing-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.voice-tutor-pricing-card:hover::before {
    opacity: 1;
}

.voice-tutor-pricing-card:active {
    transform: translateY(-2px);
}

.voice-tutor-pricing-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.voice-tutor-pricing-card.weekly {
    border-color: rgba(192, 192, 192, 0.3);
}

.voice-tutor-pricing-card.monthly {
    border-color: rgba(255, 215, 0, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.voice-tutor-pricing-card.monthly:hover {
    background: rgba(255, 255, 255, 0.18);
}

.voice-tutor-pricing-card.best-value {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.voice-tutor-pricing-card.best-value::after {
    content: 'Best Value';
    position: absolute;
    top: -8px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.voice-tutor-pricing-amount {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.voice-tutor-pricing-duration {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.voice-tutor-pricing-time {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}

.voice-tutor-pricing-period {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
}

.voice-tutor-pricing-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 10px auto 0;
}

.voice-tutor-pricing-card.loading .voice-tutor-pricing-spinner {
    display: block;
}

.voice-tutor-pricing-card.loading .voice-tutor-pricing-amount,
.voice-tutor-pricing-card.loading .voice-tutor-pricing-duration,
.voice-tutor-pricing-card.loading .voice-tutor-pricing-time,
.voice-tutor-pricing-card.loading .voice-tutor-pricing-period {
    opacity: 0.5;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notification */
.voice-tutor-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(81, 207, 102, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px 24px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 10001;
    animation: toast-slide-in 0.3s ease-out;
}

.voice-tutor-toast.show {
    display: block;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design for Pricing Grid */
@media (max-width: 768px) {
    .voice-tutor-pricing {
        padding: 30px 15px !important;
        max-width: 100% !important;
        overflow-y: auto;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .voice-tutor-pricing-header {
        margin-bottom: 30px;
    }
    
    .voice-tutor-pricing-title {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .voice-tutor-pricing-subtitle {
        font-size: 15px;
    }
    
    .voice-tutor-pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .voice-tutor-pricing-card {
        padding: 18px 14px;
        border-radius: 12px;
    }
    
    .voice-tutor-pricing-amount {
        font-size: 22px;
        margin-bottom: 6px;
    }
    
    .voice-tutor-pricing-duration {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .voice-tutor-pricing-time {
        font-size: 15px;
        margin-bottom: 3px;
    }
    
    .voice-tutor-pricing-period {
        font-size: 11px;
    }
    
    .voice-tutor-pricing-close {
        width: 44px;
        height: 44px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }
    
    .voice-tutor-toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
    
    /* Hide balance display on mobile when pricing is shown */
    .voice-tutor-overlay.show-pricing .voice-tutor-balance {
        display: none;
    }
}

@media (max-width: 480px) {
    .voice-tutor-pricing {
        padding: 20px 12px !important;
    }
    
    .voice-tutor-pricing-header {
        margin-bottom: 25px;
    }
    
    .voice-tutor-pricing-title {
        font-size: 24px;
        line-height: 1.2;
    }
    
    .voice-tutor-pricing-subtitle {
        font-size: 14px;
    }
    
    .voice-tutor-pricing-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .voice-tutor-pricing-card {
        padding: 20px 16px;
    }
    
    .voice-tutor-pricing-amount {
        font-size: 26px;
    }
    
    .voice-tutor-pricing-time {
        font-size: 16px;
    }
    
    .voice-tutor-pricing-card.best-value::after {
        font-size: 10px;
        padding: 3px 10px;
        top: -6px;
        right: 8px;
    }
    
    .voice-tutor-pricing-close {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .voice-tutor-pricing {
        padding: 15px 10px !important;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .voice-tutor-pricing-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .voice-tutor-pricing-title {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .voice-tutor-pricing-subtitle {
        font-size: 13px;
    }
    
    .voice-tutor-pricing-header {
        margin-bottom: 15px;
    }
    
    .voice-tutor-pricing-card {
        padding: 14px 10px;
    }
    
    .voice-tutor-pricing-amount {
        font-size: 20px;
    }
    
    .voice-tutor-pricing-time {
        font-size: 14px;
    }
}

