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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.app-header h1 i {
    margin-right: 15px;
    color: #4CAF50;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Status Panel */
.status-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.status-indicator i {
    font-size: 1.5rem;
    color: #666;
}

.status-indicator.listening i {
    color: #4CAF50;
    animation: pulse 1.5s infinite;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.action-btn:active {
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.action-btn span {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.action-btn small {
    color: #666;
    font-size: 0.9rem;
}

.add-btn i {
    color: #4CAF50;
}

.assist-btn i {
    color: #2196F3;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Voice Feedback */
.voice-feedback {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.feedback-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feedback-content i {
    font-size: 1.5rem;
    color: #2196F3;
    flex-shrink: 0;
}

.feedback-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* Tasks Section */
.tasks-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.section-header h2 i {
    margin-right: 10px;
    color: #4CAF50;
}

.refresh-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: #e9ecef;
    transform: rotate(180deg);
}

/* Tasks List */
.tasks-list {
    display: grid;
    gap: 15px;
}

.task-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.2s ease;
}

.task-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.task-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.task-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.task-priority {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.priority-high {
    background: #ffebee;
    color: #c62828;
}

.priority-medium {
    background: #fff3e0;
    color: #ef6c00;
}

.priority-low {
    background: #e8f5e8;
    color: #2e7d32;
}

.task-description {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.task-due {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-assigned {
    font-weight: 500;
}

.task-project {
    font-weight: 500;
    color: #2196F3;
}

.task-status {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-completed .task-status {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-inprogress .task-status {
    background: #e3f2fd;
    color: #1976d2;
}

.status-pending .task-status {
    background: #fff3e0;
    color: #ef6c00;
}

.status-notstarted .task-status {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Voice Examples Section */
.voice-examples {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.voice-examples h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

.voice-examples h3 i {
    color: #FF9800;
    margin-right: 10px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.example-category {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #4CAF50;
}

.example-category h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.example-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.example-category li {
    background: white;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 3px solid #e9ecef;
    font-size: 0.9rem;
    color: #555;
    transition: all 0.2s ease;
    cursor: pointer;
}

.example-category li:hover {
    background: #e3f2fd;
    border-left-color: #2196F3;
    transform: translateX(5px);
}

.example-category li:last-child {
    margin-bottom: 0;
}

/* Different colors for different categories */
.example-category:nth-child(1) {
    border-left-color: #2196F3;
}

.example-category:nth-child(1) li:hover {
    border-left-color: #2196F3;
}

.example-category:nth-child(2) {
    border-left-color: #FF9800;
}

.example-category:nth-child(2) li:hover {
    border-left-color: #FF9800;
    background: #fff3e0;
}

.example-category:nth-child(3) {
    border-left-color: #9C27B0;
}

.example-category:nth-child(3) li:hover {
    border-left-color: #9C27B0;
    background: #f3e5f5;
}

/* AI Enhancement Indicators */
.ai-enhanced {
    border-left: 4px solid #4CAF50;
}

.ai-suggestion {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

.ai-suggestion h4 {
    color: #4CAF50;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.ai-suggestion p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* Voice Modal */
.voice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.voice-modal.hidden {
    display: none;
}

.voice-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.voice-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
}

.voice-animation i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #4CAF50;
    z-index: 2;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 3px solid #4CAF50;
    border-radius: 50%;
    animation: pulse-ring 1.25s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-ring:nth-child(2) {
    animation-delay: 0.33s;
}

.pulse-ring:nth-child(3) {
    animation-delay: 0.66s;
}

#voicePrompt {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

#voiceResponse {
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
}

.cancel-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* Progress Indicator */
.task-progress {
    margin: 20px 0;
    text-align: center;
}

/* Security Warning */
.security-warning {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
    animation: slideDown 0.5s ease-out;
}

.security-warning-content {
    position: relative;
}

.security-warning h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}

.security-warning p {
    margin: 10px 0;
    opacity: 0.9;
}

.solutions {
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
}

.solutions h4 {
    margin: 0 0 10px 0;
    color: #ffeb3b;
}

.solutions ul {
    margin: 0;
    padding-left: 20px;
}

.solutions li {
    margin: 5px 0;
}

.close-warning {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.close-warning:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 20%;
}

#progressText {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Retry Indicator */
.retry-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
    padding: 8px 16px;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 20px;
    color: #ff9800;
    font-size: 0.9rem;
}

.retry-indicator i {
    animation: spin 2s linear infinite;
}

/* Voice Actions */
.voice-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.skip-btn, .retry-btn {
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skip-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

.retry-btn {
    background: #FF9800;
}

.retry-btn:hover {
    background: #F57C00;
    transform: translateY(-2px);
}

/* Error States */
.voice-modal-content.error {
    border-left: 4px solid #f44336;
}

.voice-modal-content.success {
    border-left: 4px solid #4CAF50;
}

.voice-modal-content.warning {
    border-left: 4px solid #FF9800;
}

/* Enhanced Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.voice-animation.error {
    animation: shake 0.5s ease-in-out;
}

.voice-animation.error i {
    color: #f44336;
}

/* Loading States for Voice Modal */
.voice-modal-content.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

/* Timeout Warning */
.timeout-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    color: #ff9800;
    font-size: 0.9rem;
    text-align: center;
}

/* AI Enhancement Badge */
.ai-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.ai-badge.offline {
    background: #757575;
}

/* Responsive Voice Modal */
@media (max-width: 480px) {
    .voice-modal-content {
        width: 95%;
        padding: 30px 20px;
    }
    
    .voice-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .voice-actions button {
        width: 100%;
        max-width: 200px;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.33);
        opacity: 1;
    }
    80%, 100% {
        transform: translate(-50%, -50%) scale(1.33);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        padding: 25px 15px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .task-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid #4CAF50;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}