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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    padding: 20px;
}

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

h1 {
    color: #333;
    font-size: 1.8em;
}

.install-btn {
    background: #4F46E5;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
}

.install-btn:active {
    transform: scale(0.95);
}

.connection-status {
    background: #FEF3C7;
    color: #92400E;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.quick-input {
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#quickText {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#quickText:focus {
    outline: none;
    border-color: #4F46E5;
}

.voice-btn {
    padding: 0 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 12px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.voice-btn:active {
    background: #4F46E5;
    color: white;
    transform: scale(0.95);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #4F46E5;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.manual-input {
    margin-bottom: 20px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 12px;
}

.manual-input summary {
    cursor: pointer;
    color: #666;
    font-weight: 600;
    padding: 10px;
    user-select: none;
}

.manual-input summary:active {
    opacity: 0.7;
}

.manual-input form {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.manual-input input,
.manual-input textarea,
.manual-input select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.manual-input textarea {
    resize: vertical;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    flex: 1;
    padding: 10px;
    background: #f0f0f0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:active {
    transform: scale(0.97);
}

.filter-btn.active {
    background: #4F46E5;
    color: white;
}

.actividades-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.actividad-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.2s;
    animation: slideIn 0.3s ease;
}

.actividad-card:active {
    transform: scale(0.99);
}

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

.actividad-card.completed {
    opacity: 0.7;
    background: #f9f9f9;
}

.actividad-card.completed h3 {
    text-decoration: line-through;
    color: #888;
}

.actividad-card h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1em;
    word-break: break-word;
}

.actividad-card p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    word-break: break-word;
}

.actividad-card .meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.actividad-card .badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 600;
}

.badge.reunion {
    background: #FFE5B4;
    color: #CC8800;
}

.badge.actividad {
    background: #D4F1F4;
    color: #007B82;
}

.actividad-card .actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.actividad-card button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.actividad-card button:active {
    transform: scale(0.95);
}

.complete-btn {
    background: #10B981;
    color: white;
    flex: 1;
}

.delete-btn {
    background: #EF4444;
    color: white;
    flex: 1;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading.error {
    background: #FEE2E2;
    border-radius: 12px;
    color: #991B1B;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.4em;
    }
    
    .meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .actividad-card button {
        padding: 8px;
        font-size: 11px;
    }
}

/* Scrollbar personalizada */
.actividades-list::-webkit-scrollbar {
    width: 6px;
}

.actividades-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.actividades-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.actividades-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}